04-30-2003, 09:55 AM
|
#1
|
|
Member (10 bit)
Join Date: Jan 2001
Location: Birmingham, UK.
Posts: 553
|
Netscape 4.7 javascript problem
I'm trying to access the value of a form element in another frame with some JavaScript. The code I have come up with works fine in IE and newer versions of Netscape but 4.7 just does nothing.
The code used to access the form element is:
window.parent.frames['subnav'].document.forms['frmproductcategory'].elements['submitted'].value
Where submav is the other frame name, frmproductcategory is the form name and submitted is the form element name. All of these have ids and names assigned.
The code in the subnav frame where the form is displayed is as follows:
Code:
<div id="productcategory" class="productcategory">
<form name="frmproductcategory" id="frmproductcategory" method="post" action="nav.asp?Flag=1">
<input type="hidden" name="submitted" id="submitted" value="">
<select name="txtproductcategory" id="txtproductcategory">
<option value="3">The Best</option>
<option value="Discontinued">Discontinued</option>
</select>
<input type="submit" name="btnGo" id="btnGo" value="Go">
</form>
</div>
Is the problem because the form is within a div?
Help please!
|
|
|