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.

Rate this knowledge base item


  • 1
    Poor

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
    Great
 
blog comments powered by Disqus

Topics

About

Amit Arora is web developer with expertise in developing eCommerce enabled websites for the businesses.

Contact | Resume

Subscribe to newsletter




Get Firefox

Monitored by Site24x7
Uptime