posting two directions

Results 1 to 2 of 2

Thread: posting two directions

  1. #1
    Joel Graham Guest

    Default posting two directions

    I have to collect a lot of data before posting it to a database. I&#039ve done it with a three-part form each part of which posts back to the same page to accumulate the data. <BR> <BR>The three pages/parts are all part of the same form which posts to itself with an action of Request.ServerVariables("script_name"). Each page has buttons (depending on the context) which go back, forward or cancel. <BR> <BR>The last page has "back", "cancel" and "submit order". The "back" posts to the form. The "cancel" is a redirect:<BR> <BR>If Len(Request("cancel")) Then Response.Redirect "main_page.asp"<BR> <BR>Once I&#039ve accumulated all the information, how can I POST the accumulated data to a different page? <BR> <BR>If Len(Request("submit_order")) Then POST TO XXXX.ASP<BR> <BR>What is the last part of that statement? Or can I even do that? Do I have to use three separate pages/forms and pass either session or hidden variables? <BR> <BR>Thanx<BR> <BR>Joel Graham

  2. #2
    Ian Stallings Guest

    Default RE: posting two directions

    Here is a way I do it on something I&#039m working on-<BR>I basically post the information using a Javascript<BR>that uses this statement:<BR><BR>function formSubmit(){<BR>if (document.forms[0].submit) document.forms[0].submit();<BR>}<BR>//notice the name &#039submit is the name of the button you<BR>//want to &#039click&#039<BR><BR>I then call it in the submit button using:<BR>"onSubmit=&#039formSubmit()&#039"<BR><BR >This is a pretty easy way to do it.<BR>combining client-side Javascript/ASP can clear<BR>up many head aches.<BR><BR>I hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •