Solved

How to tell asp to do something only after a form is submitted?

Posted on 2004-08-18
2
293 Views
Last Modified: 2010-04-17
I want to popup a message only after DW form resends the page to itself and collects a form value.

Right now my code on top of the page is:

if request.Form("signature") = 1 then

run insert into database code


else %>

  <script language="javascript">
  alert("You must check the box in the agreement statement in order to apply to the program.");
 </script>
<% end if %>

I know one can create a querystring and then confirm that the page has already run by requesting the querystring.

But is there an easier way? Basically, something to tell ASP "do this only after the sumit button has been clicked"
0
Comment
Question by:polaatx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
bigjim2000 earned 250 total points
ID: 11836204
Have a hidden text field on your page that is initially set to a vaule like "".  Then in the header of your page, check the value of that hidden text field, and do something if it is <>"".  When the user hits submit, just change this value.

Hope this helps.

-Eric
0
 

Author Comment

by:polaatx
ID: 11836313
thanks eric
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question