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

Msgbox with dropdown

Status
Not open for further replies.

aw23

Programmer
Nov 26, 2003
544
0
0
IL
I think what I am trying to do is quite simple yet as I have not coded in ASP in a long time I am having some trouble. I have a website witha a shopping cart. I need to know the state the purchase will be shipped to. So I would like to ask the user what state they will be shipping to when they enter the website and then store the variable. I figure I could use a message box with a drop down menu and then store the variable globaly. Can someone help me out with the code a little?

Thank you
 
use a session variable, and javascript, you can't do clientside stuff with ASP, but you can make a "sorta" msgbox with a drop down in a small javascript window.open and pass the value to a session/cookie setter, then you got it

unforunately at the moment i'm pressed for time, i cant write up some code now, but if no one else has added some by the time i check back in i'll be happy to give you some samples.
 
Thank you so much. If it's easier, you can just give me link if you know of somewhere I can look around online.
 
If you look up window.open in Google you'll get a ton of hits. Basically what this will let you do is open a popup window (any size you want) so you could open a window to a page tat just let the user select their zip code/state/whatever then have a javascript function that passes the data back to the parent window and closes that small popup window.


[sub]01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111[/sub]
The never-completed website:
 
Thanks. This is the problem. I am using PayPal, so they just give me the html for the button to add to my page. They do not do shipping by state which is what I need to do. So I figured I'll get the state from the user and figure out the shipping and replace their variable. However I'm not sure how to intercept their code. Once the user hits the button it takes them to the shopping cart. I want a pop up after the user hits the button, before the shopping cart so that I can change the shopping cart. Here is Paypal's code:

<form action=" method="post">

<input type="hidden" name="cmd" value="click">
<input type="hidden" name="business" value="anon@anon.com">
<input type="hidden" name="item_name" value="NameOfItem">
<input type="hidden" name="amount" value="36.00">
<input type="hidden" name="shipping" value="10.00">
<input type="hidden" name="return" value="<input type="hidden" name="cancel_return" value="<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="image" src="image.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top