?
Solved

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

Posted on 2004-08-18
2
Medium Priority
?
295 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 1000 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] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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