16 September, 2008

Vaccum kills us, space kills javascript

I was exporting certain attributes viz roadname, ids, ways etc which were of alphanumeric type by appending them with a '+' charachter from my server side perl program to the javascript program at the client. The firebug popped up, unterminated string literal, lets see whats that .... Googling did not turned out to be of much help. I tried making the string short, taking into an array etc. Sometimes it worked, sometimes it did not. Amazed, I came to a stupid conclusion on the size of the arguments that need to be passed. Perhaps, that was not the cause.On of my appended field was having a space, and string thereafter was considered as a different argument by javascript. Due to mismatch in the number of arguments for that js function, it was breaking. Such a silly mistake !!! :).
Hence, Vaccum kills us, space kills javascript or rather any function in any damn
language.

0 readers commented: