• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 640
  • Last Modified:

Append Dropdown value to Querystring?

I am creating a custom shopping cart for a client. When I have multiple items in the cart, I can not figure out how to tell which dropdown value to use. Is there a way that I could append the selected value to the querystrings below when I send the request to the server?

--
Any advice would be greatly appreciated,
Thank You,
Frank


<script type="text/javascript">
 function UpdateCart(url) {
 var ajaxRequest = new AjaxRequest(url);
 ajaxRequest.setPreRequest(function(){showProgress()});
 ajaxRequest.setPostRequest(function(){hideProgress()});
 ajaxRequest.sendRequest();
}
</script>
 
 
 
<select name="Qty_1" id="Qty_1" onchange="javascript:UpdateCart('UpdateCartProcess.cfm?ProductID=116&amp;Product_Price=60.0');">
 
<select name="Qty_2" id="Qty_2" onchange="javascript:UpdateCart('UpdateCartProcess.cfm?ProductID=111&amp;Product_Price=25.0');">

Open in new window

0
guyute91
Asked:
guyute91
1 Solution
 
Michel PlungjanIT ExpertCommented:

<select name="Qty_1" id="Qty_1" onchange="UpdateCart('UpdateCartProcess.cfm?ProductID=116&amp;Product_Price=60.0&Qty_1='+escape(this.options[this.selectedIndex].value));">
 
 
<select name="Qty_2" id="Qty_2" onchange="javascript:UpdateCart('UpdateCartProcess.cfm?ProductID=111&amp;Product_Price=25.0&Qty_2='+escape(this.options[this.selectedIndex].value));">

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now