| Author |
html form question
|
|
| gr33nd4yg1rl 2005-05-09, 9:26 pm |
| hello everyone. i am making a website as a project for school and i am kinda stuck. i made a form in html and i linked it to a shopping cart. each item that's available to "purchase" by clicking a form button sends that item to the shopping cart. my question is...is there a way to let users choose a quantity of products and have one buy now button on the bottom of the website that sends all the products to the cart at once? i can't seem to find a way to let users send multiple items to the shopping cart at once. only one type of item at a time can be sent to the cart.
any help would be greatly appreciated. | |
| enforcer 2005-05-10, 5:50 am |
| nice to see you again gr33nd4yg1rl, haven't seen you around this place for awhile.
Sorry can't help you with the question though. | |
| yanqui 2005-05-10, 1:31 pm |
| YOu're probably going to want a javascript to do that wiht. There are lots of websites that provide free javascripts, do a google search that contains all the following words: free, shopping cart, javascript
YOu'll end up with a smorgasbord of websites that can provide either that or something that will work for you. | |
| ChrisDfer 2005-05-11, 1:02 pm |
| Do you have full control over the "shopping cart"? As in is it your code? Or do you have enough knowledge of the scripting language it is in to change it? Also are all the items on a single form? Or are there multiple pages with multiple forms?
Anyways if it is all on a single page and all the item within a single form then you can simply have some text boxes which allows the user to enter in the quantity. Then at the bottom you can add your submit button pointing to the script. These would all be included in a single form of course. Of course since you're changing the type of data being submitted you're gonna have to change how the server side script processes it.
For a more complex situation where you only want them to submit a form to the server once, but it's a huge multipage site. Then you'll most likely need to use some heavy client side scripting like Javascript. | |
| ChrisDfer 2005-05-11, 1:18 pm |
| Here is a simple example I cooked up... I tried to keep it as basic as possible so that the concept is clear... Is this what you're trying to do?
http://struthers-family.com/cart.html | |
| IdiotAlert 2005-05-11, 4:15 pm |
| quote: Originally posted by ChrisDfer
Here is a simple example I cooked up... I tried to keep it as basic as possible so that the concept is clear... Is this what you're trying to do?
http://struthers-family.com/cart.html
Chris, you're such a moron. Ignore this idiot he has no idea what the hell he is talking about. I hate him more and more every time he makes a post. In every post his stupidity shows up even stronger than the last. | |
| ChrisDfer 2005-05-11, 9:16 pm |
| quote: Originally posted by IdiotAlert
Chris, you're such a moron. Ignore this idiot he has no idea what the hell he is talking about. I hate him more and more every time he makes a post. In every post his stupidity shows up even stronger than the last.
shove it round boy. | |
| yanqui 2005-05-12, 10:48 am |
| Actually, I thought it was a pretty good example.
And I'm grateful to Idiot Alert for the heads up on his own IQ. | |
| gr33nd4yg1rl 2005-05-15, 11:14 am |
| hey guys. thanks a lot for your help. i appreciate it. ChrisDfer, yes, that is what i was looking for. i didn't know how to explain it, but your example is exactly what i was looking for. thanks a lot.  | |
| gr33nd4yg1rl 2005-05-15, 11:20 am |
| hey, enforcer... how've you been doing?
quote: Originally posted by enforcer
nice to see you again gr33nd4yg1rl, haven't seen you around this place for awhile.
Sorry can't help you with the question though.
| |
| enforcer 2005-05-15, 12:14 pm |
| quote: Originally posted by gr33nd4yg1rl
hey, enforcer... how've you been doing?
Bored, wondering where all the usual crowd have disappeared to.  | |
|
|
| hwg103 2005-05-16, 1:12 am |
| You have to be careful about your site.
I debugged on for a client. You were able to change the price of the item via her form and get the product for a discount. I won't tell how it's done. But make sure you have a programmer degbug it for you. | |
| ChrisDfer 2005-05-16, 10:30 am |
| quote: Originally posted by hwg103
You have to be careful about your site.
I debugged on for a client. You were able to change the price of the item via her form and get the product for a discount. I won't tell how it's done. But make sure you have a programmer degbug it for you.
Why would you send the price of the item via a user submitted form anyways? | |
| hwg103 2005-05-16, 10:42 am |
| I'd have to get into details about how her site was designed to explain how I did this. Let's just say it was a form exploit. | |
| gr33nd4yg1rl 2005-05-19, 5:20 am |
| quote: Originally posted by hwg103
You have to be careful about your site.
I debugged on for a client. You were able to change the price of the item via her form and get the product for a discount. I won't tell how it's done. But make sure you have a programmer degbug it for you.
ok, thanks for the tip.  |
|
|
|