Submitting a form on one page!

This is a discussion on "Submitting a form on one page!" within the Classic ASP section. This forum, and the thread "Submitting a form on one page! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 10th, 2004, 03:49
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Submitting a form on one page!

Hello . How do I go about submitting a form on the page the form is actually on. I don't have any idea as to how this is done. ( i know I might just be missing 1 small line but I don't know how to do this). I want to do it this way so I can use ASP Validation and not make my user have to click back to the form page. Thanks for your help.

Wade

  #2 (permalink)  
Old Sep 10th, 2004, 09:15
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
its called "Post Back"

You simply set the forms action to the same page name and then check the request method (its gonna be GET on the first page request and POST after submission) like this:

Code: Select all
If UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" Then
  'form has been submitted
Else
  'display form
End If
Hope that helps?
  #3 (permalink)  
Old Sep 10th, 2004, 15:14
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Thank ya kindly Smokie. It works like a charm.
  #4 (permalink)  
Old Sep 10th, 2004, 15:44
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
No problem. BTW, in asp.net, all forms post back to themselves (unless you dont want them to!)
  #5 (permalink)  
Old Sep 10th, 2004, 17:50
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
it is actually the preferred way to submit/process a form, hence the .NET hardcode.
  #6 (permalink)  
Old Sep 10th, 2004, 19:03
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, I played with .Net for a little while, but It's too confusing for me and I just don't have the time to learn it. Maybe if ASP ever isn't on high demand (at least where I'm from) I'll make the switch.
Closed Thread

Tags
submitting, form, page

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submitting a parent form from a child window in IE 7 livehed JavaScript Forum 0 Feb 15th, 2007 16:23
Link form to different page after submitting facehead Web Page Design 3 Nov 3rd, 2006 21:05
submitting an enquiry form dbh_21 Web Page Design 11 Jul 11th, 2006 16:38
Auto Submitting a Form ClaireB JavaScript Forum 2 Nov 25th, 2005 08:00
Submitting Web form results to a database theproman23 Databases 2 Jun 30th, 2005 13:21


All times are GMT. The time now is 21:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43