Skip to content Skip to sidebar Skip to footer

Cross Browser Issue : Document.getelementbyid().value Not Working In Ie But Works In Firefox

I have 1 dropdown box[year], 2 text box [startDate, endDate], whenever user select year from dropdown menu then text boxes startDate should auto populate to 01/01/+year and endDate

Solution 1:

IE [at least some versions and rendering modes] wants you to access form members via the forms collection.

document.forms['someform'].elements['someelement'].value

Alternatively, you can use some ajax library (e.g. http://www.asp.net/ajax ) and use that libraries element retrieval method since those usually take browser compatibility stuff into account...

$get('element')

Post a Comment for "Cross Browser Issue : Document.getelementbyid().value Not Working In Ie But Works In Firefox"