PDA

View Full Version : netscape, onchange and onclick


KerryK137
03-26-2003, 04:42 PM
I would appreciate some help with this:
I posted a related message earlier: http://www.codingforums.com/showthread.php?threadid=15755&highlight=netscape

In summary, I have a form on a page with a drop down menu. I put a div tag around the entire form so that the form would disappear when a user scrolls over the menu. This works fine. Thanks to the help of other forum members, I figured out a workaround for the onsubmit and how to access the form elements within the div tag in NS (see other message).

The major problem is that in Netscape 4.X, none of the onclick, onchange , etc events will execute (IE works fine).

I have a similar form within a div tag with the following elements:
<select name = "A" onchange="change_C_content();">...</select>
<input type = "radio" name = "B" onclick = "change_C_content()">
<select name = "C">...</select>

I've tried putting "Alert('hi')" in the onchange event, and even that doesn't execute. Does anyone have any suggestions?

Thank you.

Roy Sinclair
03-26-2003, 07:21 PM
It's the same problem as before, the "layer" created by Netscape 4 is analogous to using an IFRAME in better browsers. The functions you're calling from inside that layer aren't present in the document object for that layer, they're present inside the parent object instead. For the sake of keeping things simple you should make sure the script for those functions are placed between the <div...> and the </div> that create the layer. Otherwise the code for your page will suffer a huge increase in complexity as you deal with the differences between the more modern browsers and that defective antique known as Netscape 4.

KerryK137
03-26-2003, 07:49 PM
Thank you for you response. I was afraid there wasn't much hope for a simple solution. I do like the characterization of Netscape 4.x as a "defective antique"; it is a much nicer phrase that what I've been thinking of!