Solved

Append Dropdown value to Querystring?

Posted on 2007-11-21
1
631 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now