Solved

Append Dropdown value to Querystring?

Posted on 2007-11-21
1
634 Views
Last Modified: 2012-08-14
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
Comment
Question by:guyute91
1 Comment
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 125 total points
ID: 20327066

<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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question