ashishware.com
ashishware.com RSS Feed
 

Posts tagged Javascript

Resizing image using Javascript in IE and FireFox

A couple of weeks ago, I wrote the following code to resize an image with javascript: imgnode.style.width= parseInt(imgnode.style.width) + 20; imgnode.style.height = parseInt(imgnode.style.width) + 20; This works perfect in IE. But does not work at all in FireFox. Then I changed it to: var width = parseInt(imgnode.style.width); var height = parseInt(imgnode.style.height); width = width – [...]

JSON syntax for javascript oldies/newbies

If you have started using javascript after a big gap and have come across strange syntax comprising of curly braces, colons and commas, you may find this post useful. Those who have been in constant touch with Javascript, you know for sure, I am talking about JSON. I have observed this that many are unaware [...]