Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

addressing form elements in Opera 6

form elements in Opera



12:37 pm on Apr 7, 2003 (gmt 0)

10+ Year Member

Hi all,

I'm having some difficulty getting a simple form JS to work in Opera. My JS script works OK in IE4+, NS4+, and NS6+.

What is the correct JS syntax to reference form elements in Opera?

I'm using the following script for the other browsers:
where the form name is "finder" and the element name is "product". This works OK except for Opera.

thanks in advance



1:17 pm on Apr 7, 2003 (gmt 0)

10+ Year Member

Whoa...don't bother, it's just all started working.

Must be browser lockup or something!



7:07 pm on Apr 7, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome [webmasterworld.com] to Webmaster World!

Well, even though it's working... You should consider switching over to something like this:

if(document.getElementById) {
else {

This requires identical name and id attributes, and is forward and backward compatible :)


8:52 pm on Apr 7, 2003 (gmt 0)

10+ Year Member


I had already tried 'getElementById' but I just got error messages, I think the browser must have crashed and confused matters.

I will use the method you suggest, it is preferable.

many thanks for the advice



Featured Threads

Hot Threads This Week

Hot Threads This Month