[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-08-18
2
Medium Priority
?
296 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
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…

649 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