Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can your page know if its been submitted?

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi there,

How can your page know if its been submitted?

I want a dialogue box to be displayed when my default page loads but want it not to come back everytime th page is submitted..

thanks for any help,
 
i use a hidden field like this:
<input type=hidden name=fSubmitted value=Yes>

you then simply check:

if request.form(&quot;fSubmitted&quot;) = &quot;Yes&quot; then
. . .etc
end if

br
Gerard
 
Hi Gerard,

But since the value &quot;yes&quot; is hard-coded the first if condition will always be true - unless i'm misunderstanding the example.

thanks,
 
Not always. I use a standard way to present the user a startscreen for reports. After hitting SUBMIT, the report is created. The submit recursively calls the same program, but the 2nd time i do not want the startscreen....



(VERY BASIC) EXAMPLE.ASP:

if request.form(&quot;fSubmitted&quot;) <> &quot;Yes&quot; then
' Build my initial screen withh parameters
<form method=post action=example.asp>
<input type=hidden name=fSubmitted value=Yes>
For which year you want this report?
<input type=text name=fYear size=4 maxlength=4>
<input type=submit>
end if

' CREATE THE REPORT
dim cYear
cYear = request.form(&quot;fYear&quot;)


etc



br
Gerard
 
Thanks Gerard,

the example makes sense to me. i will try it and let u know how it goes..

regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top