[Mapbender-dev] weird bug

Christoph Baudson christoph.baudson at wheregroup.com
Fri Feb 29 10:32:29 EST 2008


Melchior Moos schrieb:
> Hi Christoph,
> I think the bug has something to do with the instanceof statement in javascript. You can find an intresting article about that here:
> http://www.dhtmlkitchen.com/news/default/2007/10/10/How-to-Tell-if-an-Object-is-a-Function
>   

Thanks for the link, this is just what happens ;-) So it is a JS bug I 
guess...another 2 hours of my life wasted
> regards,
> Melchior
>
> -------- Original-Nachricht --------
>   
>> Datum: Fri, 29 Feb 2008 14:38:23 +0100
>> Von: Christoph Baudson <christoph.baudson at wheregroup.com>
>> An: Mapbender Developer List <mapbender_dev at lists.osgeo.org>
>> Betreff: [Mapbender-dev] weird bug
>>     
>
>   
>> Just wanted to hear your opinion on this weird bug.
>>
>> I'm in an iframe and want to call
>>
>> parent.$.toJSON()
>>
>> on an array like [1,2,3]
>>
>> var someArray = [1,2,3];
>> parent.$.toJSON(someArray)
>>
>> returns '{"0":1, "1":2, "2":3}'
>>
>> If I load jQuery and jqjson.js in the iframe directly and call
>>
>> $.toJSON(someArray)
>>
>> it returns '[1,2,3]' as expected.
>>
>> Weird, isnt it? Any idea what is wrong? We rely heavily on iframes and 
>> it is scary that these things fail :-(
>>
>> Cheers
>>
>> Christoph
>> _______________________________________________
>> Mapbender_dev mailing list
>> Mapbender_dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>>     
>
>   



More information about the Mapbender_dev mailing list