spewn
Programmer
- May 7, 2001
- 1,034
i had originally built my page and tested on IE...getElementByID was working great, even though i had labeled a majority of my tags as NAME= instead of ID=.
so when it came time to run in Netscape, a majority of my scripts failed. i figured out the problem, and re-labeled all the elements to include BOTH the NAME= and the ID= attributes. (i need the NAME= for cgi purposes)
then i got everything to work great. now i came to a radio button page within my site that isn't working. the original script calls for accessing the radio buttons like so:
getElementById(radioBtn[1]).checked=true;
although this works in IE, Netcape isn't buying it. it says the radioBtn[1] isn't declared, or doesn't exist.
any ideas? i was reading up on this and came across the term getElementByTagName...although the post didn't directly address my problem, it seemed related. is this better to use in terms of wider acceptance (browser-wise)...
- g
so when it came time to run in Netscape, a majority of my scripts failed. i figured out the problem, and re-labeled all the elements to include BOTH the NAME= and the ID= attributes. (i need the NAME= for cgi purposes)
then i got everything to work great. now i came to a radio button page within my site that isn't working. the original script calls for accessing the radio buttons like so:
getElementById(radioBtn[1]).checked=true;
although this works in IE, Netcape isn't buying it. it says the radioBtn[1] isn't declared, or doesn't exist.
any ideas? i was reading up on this and came across the term getElementByTagName...although the post didn't directly address my problem, it seemed related. is this better to use in terms of wider acceptance (browser-wise)...
- g