?
Solved

Append Dropdown value to Querystring?

Posted on 2007-11-21
1
Medium Priority
?
637 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…
Suggested Courses

764 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