Solved

Append Dropdown value to Querystring?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery Syntax 2 47
jQuery AJAX Redirects Without Response/Error 10 45
Download a website to hdd 2 49
Change javascript css 1 19
Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
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…

912 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

18 Experts available now in Live!

Get 1:1 Help Now