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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to have 3 submit buttons in one frame or one submit...

Status
Not open for further replies.

GraciePoo

Technical User
Mar 16, 2001
15
US
Is it possible to have 3 submit buttons in one frame or one submit button for 3 forms?

Or neither?

I have a frame set set up. There is a top frame called "yup" across the top and three frames lined up next to each other below that frame. Respectively, their names are "one", "two" , and "three". I have a drop down menu in the "yup" frame. The user makes a selection and I want to be able to send that selection to each of the three frames. However, there are three different forms that need to be processed here, one for each of the three frames.

What I'm wondering about is if it's possible to set up a submit button that will do what I outlined above. If that's not doable, can the "yup" frame be setup with 3 submit buttons, with each submit button handling one of the frames.

I did some digging before and some people said that this is a javascript field. I am really trying to avoid that path. However as a last resort, I could try it.

::Looking forward to replies::
 
Is it possible to have 3 submit buttons in one frame or one submit button for 3 forms?

1) It is possible to have as many submit buttons as you want in each HTML file. e.g.
Code:
<input type=&quot;submit&quot; name=&quot;sub1&quot; value=&quot;send1&quot;>
<input type=&quot;submit&quot; name=&quot;sub2&quot; value=&quot;send1&quot;>

2) It is not possible to use one submit button for three forms. E.g. one submit button will submit that form in which it is located. But there is a workaround. You can create your own button (not of the type stubmit) that will submit all three forms. Example:

Code:
<head>
<script>
function myOwnSubmit()
{
 document.myForm1.submit();
 document.myForm2.submit();
 document.myForm3.submit();
}
</script>
...
</head>
<body>
...
<form name=&quot;myForm1&quot;>
...
...
<input type=&quot;button&quot; name=&quot;b1&quot; value=&quot;SEND&quot; onclick=&quot;myOwnSubmit()&quot;>
...
</body>
---
---
 
Rydel,

I'm a little unclear about the structure of the form tags in your example.

Would it be setup something like this?

<form name=&quot;myForm1&quot; method=post action=&quot;something.html&quot; target=one>
...
</form>

<form name=&quot;myForm2&quot; method=post action=&quot;someone.html&quot; target=two>
...
</form>

<form name=&quot;myForm3&quot; method=post action=&quot;somewhere.html&quot; target=three>
...
</form>

<input type=&quot;button&quot; name=&quot;b1&quot; value=&quot;SEND&quot; onclick=&quot;myOwnSubmit()&quot;>
 
Uh, I just remembered that </form> tags go after the <input blah blah blah> tags. Hmm...

::still confused::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top