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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using If Statement and A Post

Status
Not open for further replies.

Figzus

Programmer
Mar 21, 2005
36
0
0
US
Im having trouble with this If statement I just cant seem to figure out how to get it going. If I use the submit button to submit a value from a drop down list on my home page I need it to see that on my next page Im submitting a value from the drop down list and do what I need it to do otherwise do what it was doing before. Im just having trouble getting creating that If statement. Hopefully thats enough info if not just tell me. Thanx
 
Huh?

That is almost totally incomprehensible.

Would this be the pseudocode for your situation:
Code:
If ValueSubmitted Then
  ShowValue
Else
  DoWhatYouWereDoingBefore
End If
 
That's what I got out of it Sheco. But my question is -- how else would the form be submitted if not by a submit button? And what else would the next page do if not something based on the prior page?
 
Sorry I just found a better way to phrase it. Im just looking to check If a region is specified from the previous page then do what I need it to do otherwise do what it normally before. Im just checking to see If there is a specified region or not. Sorry for the confusion.
 
So you have a dropdown list on the first page and the options in the list are different regions.

And on the second page you want to check to see if any region was chosen?

Is that right?
 
Yes. Sorry I used way to many words to describe my problem. Its been a long day.
 
If you have something like this:
Code:
<form method="post" action="page2.asp">
 <select name="region">
  <option>Select Region</option>
  <option value="N">North</option>
  <option value="E">East</option>
  <option value="S">South</option>
  <option value="W">West</option>
 </select>
</form>

Then on your second page you can do something like this:
Code:
IF (Len(Request.Form("region")) > 0) THEN
  Response.Write "The region is: " & Request.Form("region") & "<BR>"
END IF


 
Classic...lol

confused_smile.gif


Code:
Huh?

That is almost totally incomprehensible.


been tired too....we tend to joke around...please don't take personnaly :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top