473,465 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Netscape v. IE DOM - lonesome forms above frameset

I have a page that looks like:

<html>
<head><blah></head>
<form id="me">
<input id="foo" type="hidden"...>
<frameset> <frame id="here" ...>
</form>
....</html>

The "here" frame's page is trying to access the above form.

In IE, this can be done as:
top.document.forms[0].foo.value

But under Netscape (7.1), it seems like the FORM is not being
processed at all. I tried all kinds of paths to find it.
On the main page, I wrote a little onload function for the FRAMESET,
and it reports that the top.document.forms.length => 0.

Maybe it's not legal to have that FORM there, outside of any BODY,
and maybe Netscape is just ignoring it entirely. Or maybe I'm just
confused about how I might reference it.

I didn't design this page, but I can change it in any way needed.

Suggestions?
Jul 23 '05 #1
3 1335


Christopher C. Stacy wrote:
I have a page that looks like:

<html>
<head><blah></head>
<form id="me">
<input id="foo" type="hidden"...>
<frameset> <frame id="here" ...>
</form>
...</html> But under Netscape (7.1), it seems like the FORM is not being
processed at all.


Your HTML document should either have a <body> after the <head> and in
that <body> you can have your <form> (and maybe an <iframe> if needed)
or it should have a <frameset> following the <head>. HTML 4 is defined at
http://www.w3.org/TR/html4/
what you have above is not following those rules.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2
>>>>> On Thu, 01 Jul 2004 10:07:18 +0200, Martin Honnen ("Martin") writes:

Martin> Christopher C. Stacy wrote:
I have a page that looks like:
<html>
<head><blah></head>
<form id="me">
<input id="foo" type="hidden"...>
<frameset> <frame id="here" ...>
</form>
...</html> But under Netscape (7.1), it seems like the FORM is not being
processed at all.


Martin> Your HTML document should either have a <body> [...]

I didn't design this mess, but what the author is trying to do is to
work with a sequence of three pages. The first one, not shown here,
posts a bunch of variables to the second page. My example above
is the second page, which needs to be able to receive the INPUT.
The third page is in the FRAMESET, and it wants to read out the
variables from that second page using Javascript.

This hack works under IE, because IE allows the FORM as a toplevel
element in the HTML. You say this is not legal HTML, and without
checking carefully, I think you're probably right. My original
message was already suggesting that perhaps that's why Netscape
did not seem to be rendering the FORM in the document object.

I also asked an implied question: Does Netscape 7.1 implement
the DOM that I think it does, where top.document has a forms array
(with no funny layers business in there or anything like that).
Jul 23 '05 #3
Martin Honnen wrote:
Christopher C. Stacy wrote:
I have a page that looks like:

<html>
<head><blah></head>
<form id="me">
<input id="foo" type="hidden"...>
<frameset> <frame id="here" ...>
</form>
...</html>

But under Netscape (7.1), it seems like the FORM is not being
processed at all.
Your HTML document should either have a <body> after the <head> and in
that <body> you can have your <form> (and maybe an <iframe> if needed)


Both the start and the end tag of the "body" element are optional
in HTML, so this should not be a problem regarding DOM scripting
and it is not in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2)
Gecko/20040630 Firefox/0.8.0+, so I doubt it is in Netscape 7.1.
or it should have a <frameset> following the <head>. HTML 4 is
defined at
http://www.w3.org/TR/html4/
what you have above is not following those rules.


True.

And the "blah" element is undefined in HTML and could cause a problem
as well but I think it was only a replacement for posting. However,
that replaced code may cause a problem as well. It appears best not
to post changed code but code with reasonable marked omissions or the
full unchanged code, if too much for a newsgroup posting to be linked
with a URL of a public Web site.
PointedEars
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in...
9
by: Dom | last post by:
I have a frameset with a left right columns, called 'index' and 'content'. The left column of the frameset ('index') loads an index.htm file which have these hrefs (summarized the code a bit)...
2
by: CES | last post by:
All, I'm at a loss, the code below works in IE but not in Netscape and I'm unskilled enough not to know why. Essentially this code looks thru all of the form fields and if the input box has a...
5
by: Dan Tartakovsky | last post by:
Hi, folks. Does this error below look familiar to you? I'm trying to access function in one frame from the other frame. Error is received while working with Opera or Netscape (different errors)....
5
by: Terri I. | last post by:
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...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
1
by: Greg Cyrus | last post by:
Hi, I make my first steps in programming ASP.NET-Apps. While writing, testing and excuting the Application I always use the built-in IE6.0 - everthing ok - no probs - no error. Then I tested...
3
by: register_allocation | last post by:
I have a frameset where I call a JavaScript function in the onLoad method: .... <frameset cols="..." onLoad="setFn()"> ... <frame name="data_frame" ...> </frameset> In setFn, I am...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.