Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > submit form to multiple pages

Reply
Thread Tools

submit form to multiple pages

 
 
Slug
Guest
Posts: n/a
 
      10-12-2004
Hello,
I've tried to find this answer, but can't seem to get a clear example -

I'm using the following classic asp code to submit a form:
<form action="default.asp" name=order method=post>

What I need to do is to submit the form to multiple .asp pages, (that I
want to join with frames) and I can't find a way to do it.

Thanks.

 
Reply With Quote
 
 
 
 
Just1Coder
Guest
Posts: n/a
 
      10-12-2004
Slug wrote:
> Hello,
> I've tried to find this answer, but can't seem to get a clear example -
>
> I'm using the following classic asp code to submit a form:
> <form action="default.asp" name=order method=post>
>
> What I need to do is to submit the form to multiple .asp pages, (that I
> want to join with frames) and I can't find a way to do it.
>
> Thanks.
>

Not very efficient, but you could carry the form variables over after
the first post to a second, third.. etc...

top of defalut.asp
dim frmval1, frmval2
frmval1 = request.form("frmval1")
frmval2 = request.form("frmval2")

process the form here...

... at the end of default.asp..

if err.number <> and all other business rules = true then
response.redirect("action2.asp?frmval1=frmval1&fmr val2=frmval2")
end if
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      10-12-2004

Use Javascript.

<html>

<head>
<script type="text/javascript">
function formSubmit()
{
document.forms.myForm.action="action1.asp"
document.forms.myForm.submit()
document.forms.myForm.action="action2.asp"
document.forms.myForm.submit()
}
</script>
</head>

<body>
<form name="myForm" method="get">
Firstname: <input type="text" name="firstname" size="20"><br />
Lastname: <input type="text" name="lastname" size="20"><br /><br />
<input type="button" onclick="formSubmit()" value="Submit">
</form>
</body>

</html>


"Slug" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) oups.com...
> Hello,
> I've tried to find this answer, but can't seem to get a clear example -
>
> I'm using the following classic asp code to submit a form:
> <form action="default.asp" name=order method=post>
>
> What I need to do is to submit the form to multiple .asp pages, (that I
> want to join with frames) and I can't find a way to do it.
>
> Thanks.
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-12-2004
Did you try this? The second submit won't happen, because control will
already have been handed over to action1.asp.

--
http://www.aspfaq.com/
(Reverse address to reply.)






"John" <n o b o d http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news:XbWad.276903$(E-Mail Removed)-ops.be...
>
> Use Javascript.
>
> <html>
>
> <head>
> <script type="text/javascript">
> function formSubmit()
> {
> document.forms.myForm.action="action1.asp"
> document.forms.myForm.submit()
> document.forms.myForm.action="action2.asp"
> document.forms.myForm.submit()
> }
> </script>
> </head>
>
> <body>
> <form name="myForm" method="get">
> Firstname: <input type="text" name="firstname" size="20"><br />
> Lastname: <input type="text" name="lastname" size="20"><br /><br />
> <input type="button" onclick="formSubmit()" value="Submit">
> </form>
> </body>
>
> </html>
>
>
> "Slug" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed) oups.com...
> > Hello,
> > I've tried to find this answer, but can't seem to get a clear example -
> >
> > I'm using the following classic asp code to submit a form:
> > <form action="default.asp" name=order method=post>
> >
> > What I need to do is to submit the form to multiple .asp pages, (that I
> > want to join with frames) and I can't find a way to do it.
> >
> > Thanks.
> >

>
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-12-2004
You can do one of three things:

- submit to form1, then use hidden form variables to submit to form2 (maybe
using a hidden frame)
- post the value of request.form to form2 using MSXML
(http://www.aspfaq.com/2173)
- combine the functionality of both forms so that you only need to submit to
one page

I strongly recommend against using frames. They mess with the browser's
bookmarks and history, and very rarely provide functionality that a
non-framed page provides. Besides, they won't help you solve this issue.

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Slug" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello,
> I've tried to find this answer, but can't seem to get a clear example -
>
> I'm using the following classic asp code to submit a form:
> <form action="default.asp" name=order method=post>
>
> What I need to do is to submit the form to multiple .asp pages, (that I
> want to join with frames) and I can't find a way to do it.
>
> Thanks.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit abansal.itp@gmail.com Javascript 3 06-23-2007 07:29 AM
Forms with multiple submit buttons vs 'form' objects with single 'submit' methods neil.fitzgerald@ic.ac.uk Python 4 04-14-2006 04:58 PM
submit form data in multiple buttons on a html form Matt Javascript 1 07-05-2004 10:12 PM
submit form data in multiple buttons on a form Matt ASP General 2 06-27-2004 11:43 AM
submit form data in multiple buttons on a html form Matt HTML 0 06-26-2004 08:04 PM



Advertisments