Checking the constructor is a bad idea; if you try checking the constructor of an object within an iframe it won't have the same constructor as an object outside of the iframe. I think this'll do what's required:
function isObj(o){ return Object.prototype.toString.call(o) === '[object Object]' } from: http://thinkweb2.com/projects/prototype/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ On 24 July, 15:00, DBJDBJ <dbj...@gmail.com> wrote: > > function isWhat ( x ) { > return (""+x.constructor).split("(")[0].split("function")[1].trim > () ; > // or your clever RegEx here ... > > } > --DBJ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---