473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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

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
9 2298
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
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
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

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
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

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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: flupke | last post by:
Hi, i need to develop a gui which will load several "windows" depending on what the users selects in the menu and i thought i could accomplish this with panels. What i'm trying to do to test...
3
by: KathyB | last post by:
Hi, I'm trying to find a way to validate input text boxes where I don't know the names until the page is rendered. I've got 2 validate functions that fire with the onsubmit button of a "mini" form...
1
by: Alex Hunter | last post by:
is there a way to make one frame on a page load completely before the other frame starts loading?
8
by: cool2005 | last post by:
I tried to dynamically add/clone a <tr> from an existing <tr> to a <table> but the problem is that I need to have a "onclick" event handler in the <tr>. I have tried following A. approach...
5
by: A.Dagostino | last post by:
hi i need to update an SQL Table when user select or unselect a checkbox control. How Can i do? Thanks Alex
3
by: HK guy | last post by:
How to write a program that can check the web page loading time? Before I have written a browser that use IE as the core, but it does not support frame. Since the documentcomplete event will...
2
by: DataSmash | last post by:
Hello, I've created a simple form with 2 radio boxes, 2 text boxes and a button. When I click the button, I'd like to write each "choice" to a text file. I can't figure out how to "link" the...
2
by: eholz1 | last post by:
Hello CSS and StyleSheet members, I have decided to move away from Dreamweaver javascript rollover buttons, in favor of a CSS type rollover button. (hope that is ok). I plan to use PHP to...
1
by: Jacqui | last post by:
Hi, I am trying to write a webpage that has a form on it, which gets submitted when a button is pressed, but also has an onclick event which does some DOM manipulation to display a waiting page....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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...

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.