468,253 Members | 1,302 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

Form has no properties in Netscape 7

I have an application that uses HTML, JavaScript, and ColdFusion 4.5. It
was originally written for NN 4.75, and I am updating it to work in the newer
browser. The application consists of a number of frames (some embedded within
each other), and for this particular function, I need to pass data between forms
on 2 different frames.
I updated all references to forms to use recommended syntax, i.e.
document.forms.formname, but I am still getting error that the form has no
properties. I added debugging code to view forms associated with the document,
and it shows that there are 0 forms, so somehow the system does not recognize
the form when I try to reference it from the other frame.
Does anybody have any other recommendations on how to deal with the no properties
error or what other causes for this might be??

FYI, here is some of my debugging code to show how I try to reference form:
var numForms = top.DataFrame.PlotBottomFrame.document.forms.lengt h;
alert("Number of forms in PlotBottomFrame is " + numForms);
for (var i=0; i<numForms; i++)
{
alert("In loop - Number of forms in PlotBottomFrame is " + numForms);
alert("Form is " + top.DataFrame.PlotBottomFrame.document.forms[i].name);
}
Jul 20 '05 #1
5 1368
In article <b1**************************@posting.google.com >, te*****@ucia.gov
(Terri I.) writes:
FYI, here is some of my debugging code to show how I try to reference form:
var numForms = top.DataFrame.PlotBottomFrame.document.forms.lengt h;
alert("Number of forms in PlotBottomFrame is " + numForms);
for (var i=0; i<numForms; i++)
{
alert("In loop - Number of forms in PlotBottomFrame is " + numForms);
alert("Form is " + top.DataFrame.PlotBottomFrame.document.forms[i].name);
}


parent.DataFrame
or:
parent.frames['DataFrame']....
--
Randy
Jul 20 '05 #2
On 8 Jan 2004 13:27:44 -0800, Terri I. <te*****@ucia.gov> wrote:

<snip>
I updated all references to forms to use recommended syntax, i.e.
document.forms.formname, but I am still getting error that the form has
no
properties. I added debugging code to view forms associated with the
document,
and it shows that there are 0 forms, so somehow the system does not
recognize
the form when I try to reference it from the other frame.
Does anybody have any other recommendations on how to deal with the no
properties
error or what other causes for this might be??

<snip>

Try applying the same syntax to frame accesses so:

top.DataFrame.PlotBottomFrame.document.forms.lengt h

becomes:

top.frames['DataFrame'].frames['PlotBottomFrame'].document.forms.length

or, more reasonably:

var bottomFrame = top.frames['DataFrame'].frames['PlotBottomFrame'];
var numForms = bottomFrame.forms.length;
...

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #3
I have tried suggestions from both posters, with no success.
The exact same code works fine in Netscape 4.75. It's like Netscape 7
just doesn't recognize the form buried within the embedded frames.
Does anybody else have any other suggestions??

Michael Winter <M.******@blueyonder.co.invalid> wrote in message news:<op**************@news-text.blueyonder.co.uk>...
On 8 Jan 2004 13:27:44 -0800, Terri I. <te*****@ucia.gov> wrote:

<snip>
I updated all references to forms to use recommended syntax, i.e.
document.forms.formname, but I am still getting error that the form has
no
properties. I added debugging code to view forms associated with the
document,
and it shows that there are 0 forms, so somehow the system does not
recognize
the form when I try to reference it from the other frame.
Does anybody have any other recommendations on how to deal with the no
properties
error or what other causes for this might be??

<snip>

Try applying the same syntax to frame accesses so:

top.DataFrame.PlotBottomFrame.document.forms.lengt h

becomes:

top.frames['DataFrame'].frames['PlotBottomFrame'].document.forms.length

or, more reasonably:

var bottomFrame = top.frames['DataFrame'].frames['PlotBottomFrame'];
var numForms = bottomFrame.forms.length;
...

Mike

Jul 20 '05 #4
Lee
Terri I. said:

I have tried suggestions from both posters, with no success.
The exact same code works fine in Netscape 4.75. It's like Netscape 7
just doesn't recognize the form buried within the embedded frames.
Does anybody else have any other suggestions?


In the following example, the left frame accesses a form element's
value from the right frame as:

top.frames['right'].document.forms['myform'].elements['message'].value

Where "right", "myform" and "message" are all NAME attributes.
It works in Netscape 4.75 and 7.1.

I've defined the frame contents in script in order to be able to post
it as a single file. That's not significant to your problem.

<html>
<head>
<script type="text/javascript">
leftFrameHTML="<html><body><form><input type='button' onclick=\""
+"alert(top.frames['right'].document.forms['myform']."
+"elements['message'].value)\" value='test'></form>"
+"</body></html>";
rightFrameHTML="<html><body><form name='myform'><input name='message'"
+" value='Hello, world!'></form></body></html>";
</script>
</head>
<frameset cols="50%,*">
<frame name="left" src="javascript:top.leftFrameHTML">
<frame name="right" src="javascript:top.rightFrameHTML">
</frameset>
</html>

Jul 20 '05 #5
Terri I. wrote:
I have tried suggestions from both posters, with no success.
The exact same code works fine in Netscape 4.75. It's like Netscape 7
just doesn't recognize the form buried within the embedded frames.
WFM.
Does anybody else have any other suggestions??
Please show the relevant snippet of your new code
[...]


and stop top posting.
PointedEars
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Chris | last post: by
18 posts views Thread by Toronto Web Designer | last post: by
9 posts views Thread by dhtml | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.