Home
» Knowledge base » Array.push() doesn't work in IE 5 ?
Older Javascript browser doesn't support array.push() method ?
How do I add element without using the push in javascript ?
Array.push() doesn't work in IE 5 ?
Older Javascript browser doesn't support array.push() method ?
How do I add element without using the push in javascript ?
2 August 2004, 08:18 pm IST
User Rating: 7.1 (131 votes)
Older broswer including the IE5 doesn't support the array.push()
method.
To overcome this disablility, you can use the following code to add the items to the array:
arSelected = array() // Initallize array
arSelected[arSelected.length] = 1; // Add value
arSelected[arSelected.length] = 17; // Add value
arSelected[arSelected.length] = 150850; // Add value
As you must have guess that this code will work safely in the new broswers too, so you can safely use this.
Topics
- Apache (2)
- Javascript (1)
- PHP (5)
- Windows (3)
About
Amit Arora is web developer with expertise in developing eCommerce enabled websites for the businesses.

Monitored by Site24x7
Uptime