DelphiFAQ Home Search:
General :: Web publishing :: JavaScript :: Document


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

getElementById() works in Internet Explorer but fails in Firefox - why?


getElementById() works in IE but fails in Firefox - why?


If you have forgotten to add the element's name as an ID, then Internet Explorer will find it, if the name is given.

// Example:
 <input type=checkbox name=acl_type>
 // the following will work in IE, but not in FireFox
 var ctrl = document.getElementById('acl_type');
 // define it like this and it will work both in IE and in FireFox
 <input type=checkbox name=acl_type id=acl_type>

Generated 8:01:43 on Jul 7, 2020