Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Forms in Frameset

Status
Not open for further replies.

BLarche

Programmer
Nov 29, 2004
25
US
I asked this question earlier, but here is my problem. I have a popup window with a frameset. In one frame I have radio buttons and in the other frame, I have the submit button for those radio buttons. How do I link these two forms together? I have an onsubmit button that passes the values of the radio buttons to a dropdown menu and automatically closes the window.
 
The "submit" button in the one frame should look like this:

Code:
<input type="button" value="submit main form" onclick="parent.frames['mainframename'].document.forms['formname'].submit();" />

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Okay. I also have a function called setValue(); that I need to be executed when the form is submitted. How do I add this value as well?
 
which form?

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I need to incorporate it into the submit button. The javascript is in the Top frameset with the function.
 
so, it should work. if you're calling the js from the main frameset's form's onsubmit event, then calling the submit() event as I showed you will submit the main form, causing the code to be called.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Yes, but when are we calling the function "setValue();"? I need this function to be called when you submit the button, correct? Currently when I press the submit button, it does nothing. If you goto the website I posted above and view the code, you will see waht is going on. Or I can paste the code here.
 

Code:
<form name="outputForm" onsubmit="return setValue();">

I did not, however, check to see if the function would run correctly. With that line of code, if your function returns false, then the form will not submit. If it returns true, the form will submit.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Hmm, still not working. Where if any, do I add the process and action properties? Is that the reason for this not working?
 
huh?
I've never heard of process, but the action of the form goes in the form tag, and should be the name of the file you're submitting to.

Code:
<form name="outputForm" action="page.html" onsubmit="return setValue();">

Try putting
alert('here');

as the first line in your function to see if it gets called at all.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Yeah, which page exactly am I submitting this to though? A page in the frameset? Or the original page?
 
why are you asking me that? that's up to you!

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top