Welcome to WebmasterWorld Guest from 54.205.75.60

Forum Moderators: open

Message Too Old, No Replies

Javascript

Is their one to send a code to the shopping cart?

   
4:21 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



Hey all.. I am hoping someone can help. With any order that one places through our website they are entitled to receive a free gift, the thing is they must choose between two items though, item A and item B. Once they decide I am having them type this into an empty box their choice of what free gift they want which then sends it in with their order so it can be viewed on the backend when we review the order on our end.
With that said, we recently had a custom program written for processing our orders and need for this item to be uniform so what we need to do is create some kind of javascript code where this person will either check off a box or click on a selection and have that send an item code into their order page so we can view it on the backend. The reason for that is this custom program will look for this item code in our inventory and automatically take it out and if you have people type in a box they type all different things which would not work since this needs to be a specific item code with no variances.
I have tried some scripts but what they do is just simply put in a spot on the order form with the name as I type it and then where I need the item code to be sent though instead of putting item code "AC23A" it simply puts a "yes" like listed below:

Item A: yes

Is their a script that I can implement that will put the code "AC23A" instead of a simple "yes"

If anyone knows and is still with me here and didnt fall asleep, I really appreciate your help!

Thanks!

Chris

5:04 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



Since there are only two items for them to choose from, I would probably use radio buttons, a standard part of forms. With radio buttons, they are forced to choose from one of the choices listed (can be more than two). Check out the syntax for radio boxes on any good HTML syntax site.