Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Form has no properties in Netscape 7

Reply
Thread Tools

Form has no properties in Netscape 7

 
 
Terri I.
Guest
Posts: n/a
 
      01-08-2004
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);
}
 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      01-09-2004
On 8 Jan 2004 13:27:44 -0800, Terri I. <> 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
d (replace ".invalid" with ".uk" to reply)
 
Reply With Quote
 
 
 
 
Terri I.
Guest
Posts: n/a
 
      01-13-2004
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 <> wrote in message news:<>...
> On 8 Jan 2004 13:27:44 -0800, Terri I. <> 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

 
Reply With Quote
 
Lee
Guest
Posts: n/a
 
      01-13-2004
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>

 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      02-04-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netscape 7.1 to Netscape 8 Skid Schermerhorn Firefox 2 09-05-2005 04:04 PM
Accessing Netscape mail via Netscape mail client A. Toprak Computer Support 0 12-24-2004 06:46 AM
Netscape with JRE 1.5 beta 1 ignores Netscape signing Mickey Segal Java 1 05-21-2004 01:52 PM
form.elements[x] has no properties jeep@13.usenet.us.com Javascript 2 10-27-2003 03:41 PM
websphere, oracle, netscape: netscape timeout Tom Java 0 08-01-2003 11:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57