By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,572 Members | 2,949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,572 IT Pros & Developers. It's quick & easy.

sanity check: onClick not loading frame? (IE/NS)

P: n/a
Not sure why none of these permutations are working. I appreciate a
second set of eyes!

Expand|Select|Wrap|Line Numbers
  1. ....
  2. <form id="form1" name="form1" >
  3. ....
  4. <input name="Submit1" type="submit" tabindex="10"
  5. onClick="parent.mainFrame.location.href='SelectSystem.html';"
  6. value="Done" />
  7. <input name="Submit2" type="submit" tabindex="10"
  8. onClick="parent.mainFrame.location='SelectSystem.html';" value="Done"
  9. />
  10. <input name="Submit3" type="submit" tabindex="10"
  11. onClick="parent.frames['mainFrame'].location.href='SelectSystem.html';"
  12. value="Done" />
  13.  
The frameset is defined as such:
Expand|Select|Wrap|Line Numbers
  1. <frameset rows="161,*" cols="*" frameborder="no" border="0"
  2. framespacing="0">
  3. <frame src="TitleBarContent.html" name="topFrame" scrolling="No"
  4. noresize="noresize" id="topFrame" title="TopFrame" />
  5. <frameset rows="*" cols="164,*" framespacing="0" frameborder="no"
  6. border="0">
  7. <frame src="LeftNavContent.html" name="leftFrame" scrolling="No"
  8. noresize="noresize" id="leftFrame" title="LeftFrame" />
  9. <frame src="SelectSystem.html" name="mainFrame" id="mainFrame"
  10. title="MainFrame" />
  11. </frameset>
  12. </frameset>
  13.  
Many thanks to those with a sharp eye!

--Alexandra

Aug 17 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Alexandra wrote:
Not sure why none of these permutations are working. I appreciate a
second set of eyes!
[snip code]
Your code should work, though it's not ideally constructed. Please
consider using <input type="button" in stead of <input
type="submit" . Also, the closing </form tag is missing.

But you can keep this more down to earth; I'ld do something like

<form method="get" action="SelectSystem.html" target="mainFrame">
<input type="submit" value="Done">
</form>

--
Bart

Aug 17 '06 #2

P: n/a
Thank you Bart!

I knew I was forgetting something VERY fundamental, and that was it.
(Haven't done JS in about 3 years.) Changing the type from "submit" to
"button" was exactly the solution.

I would put the link in the action, but have 5 buttons each going to a
different place (mockup purposes).

Thanks again!

--Alexx

Bart Van der Donck wrote:
Alexandra wrote:
Not sure why none of these permutations are working. I appreciate a
second set of eyes!
[snip code]

Your code should work, though it's not ideally constructed. Please
consider using <input type="button" in stead of <input
type="submit" . Also, the closing </form tag is missing.

But you can keep this more down to earth; I'ld do something like

<form method="get" action="SelectSystem.html" target="mainFrame">
<input type="submit" value="Done">
</form>

--
Bart
Aug 17 '06 #3

P: n/a
Alexandra wrote:
Thank you Bart!
I knew I was forgetting something VERY fundamental, and that was it.
(Haven't done JS in about 3 years.) Changing the type from "submit" to
"button" was exactly the solution.

I would put the link in the action, but have 5 buttons each going to a
different place (mockup purposes).
No problem, but maybe you're referring to line breaks that may appear
between different <form>..</formcalls. One workaround:

<table>
<tr>
<form method="get" action="fileONE.html" target="mainFrame">
<td>
<input type="submit" value="Done">
</td>
</form>
<form method="get" action="fileTWO.html" target="mainFrame">
<td>
<input type="submit" value="Done">
</td>
</form>
</tr>
</table>
Thanks again!
My pleasure !

--
Bart

Aug 17 '06 #4

P: n/a

Bart Van der Donck wrote:
Alexandra wrote:
Thank you Bart!
I knew I was forgetting something VERY fundamental, and that was it.
(Haven't done JS in about 3 years.) Changing the type from "submit" to
"button" was exactly the solution.

I would put the link in the action, but have 5 buttons each going to a
different place (mockup purposes).

No problem, but maybe you're referring to line breaks that may appear
between different <form>..</formcalls. One workaround:

<table>
<tr>
<form method="get" action="fileONE.html" target="mainFrame">
A form can't be a child of a TR element, the HTML is invalid.

[...]

--
Rob

Aug 17 '06 #5

P: n/a
RobG wrote:
[...]
A form can't be a child of a TR element, the HTML is invalid.
Depends on how your document defines "invalid HTML". Using something
like

<!DOCTYPE HTML SYSTEM "http://www.dotinternet.be/temp/my.dtd">

should be okay (= the HTML 4.0 Transitional DTD with altered lines 655
and 843 in order to allow FORM between TR and TD).

--
Bart

Aug 18 '06 #6

P: n/a

Bart Van der Donck wrote:
RobG wrote:
[...]
A form can't be a child of a TR element, the HTML is invalid.

Depends on how your document defines "invalid HTML". Using something
like

<!DOCTYPE HTML SYSTEM "http://www.dotinternet.be/temp/my.dtd">

should be okay (= the HTML 4.0 Transitional DTD with altered lines 655
and 843 in order to allow FORM between TR and TD).
Look again at the code the OP posted - a munge of faux XHTML with
mixed-case attribute names. I can pretty much guarantee that the
inference of a bespoke transitional DTD slipped by completely unoticed.
:-)

--
Rob.

Aug 18 '06 #7

P: n/a
RobG wrote:
[...]
Look again at the code the OP posted - a munge of faux XHTML with
mixed-case attribute names. I can pretty much guarantee that the
inference of a bespoke transitional DTD slipped by completely unoticed.
:-)
Very true. But since we're dealing with a beautiful lady here, I
formulated that in another post as "not ideally constructed" :-)

--
Bart

Aug 18 '06 #8

P: n/a
On 18/08/2006 09:15, Bart Van der Donck wrote:
RobG wrote:
>A form can't be a child of a TR element, the HTML is invalid.

Depends on how your document defines "invalid HTML".
[snip]

Theoretically, yes, but before even thinking about custom DTDs, it's
important to consider how browsers really behave. After all, they work
to their own idea of HTML - trying to create your own definition is
pointless - and triggering error correction in a case such as this might
be disastrous.

The reasoning behind adopting valid HTML 4.01 is that no browser should
deem it necessary to perform error correction, therefore the document
tree is predictable. This is important for both scripting, and in cases
where elements should have a specific relationship with other elements
(such as form controls and their containing form). For instance, the
document tree in Firefox is thoroughly distorted: the form elements are
siblings of the table cells, and the form controls don't have a form
ancestor at all. Luckily for you, the controls are still associated with
the right form.

There's no justification here for not inserting the form elements in the
right place - within the table cells. An alternative is to use just a
single form, and have the server determine the destination based upon
the submitted data (the name/value pair of the activated submit button).

Mike
Aug 18 '06 #9

P: n/a
Michael Winter wrote:
[...]
The reasoning behind adopting valid HTML 4.01 is that no browser should
deem it necessary to perform error correction, therefore the document
tree is predictable. This is important for both scripting, and in cases
where elements should have a specific relationship with other elements
(such as form controls and their containing form). For instance, the
document tree in Firefox is thoroughly distorted: the form elements are
siblings of the table cells, and the form controls don't have a form
ancestor at all. Luckily for you, the controls are still associated with
the right form.

There's no justification here for not inserting the form elements in the
right place - within the table cells. An alternative is to use just a
single form, and have the server determine the destination based upon
the submitted data (the name/value pair of the activated submit button).
Yes. Just putting <form></forminside each <td></tdis the solution
here. My suggestion was rather an academic exercise; you can validate
almost anything with bespoke DTD's.

--
Bart

Aug 18 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.