Solved

To CWOLVES or anyone who know how to submit multiple javascript variables:  One more question about multiple values:

Posted on 2004-09-16
4
179 Views
Last Modified: 2008-03-10
<input type="button" name="Submit" value="Process Order" OnClick="opener.location='notyet.asp?id=<%=id%>&cd=yes&dates=<%=dates%>&shipcharge='+document.forms[0].shipcharge.value;'&shipping='+document.forms[0].shipping.value;self.close();">

That doesn't work it gives me the shipcharge value but not the shipping value  - is there something that will?

0
Comment
Question by:foreverdita
  • 2
4 Comments
 
LVL 9

Expert Comment

by:cwolves
ID: 12077991
take the ; out after shipcharge.value and replace it with a +:

<input type="button" name="Submit" value="Process Order" OnClick="opener.location='notyet.asp?id=<%=id%>&cd=yes&dates=<%=dates%>&shipcharge='+document.forms[0].shipcharge.value+'&shipping='+document.forms[0].shipping.value;self.close();">
0
 

Author Comment

by:foreverdita
ID: 12077998
the ' ends the url string - I don't know what to use in javascript to continue it.  In asp I use "&myvariable&"

0
 
LVL 9

Accepted Solution

by:
cwolves earned 500 total points
ID: 12078063
this is one string:

var x='adsf'+(2+2)+'&fdsa='+(2+2);
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 12078199
you know you can do everything without opening another page

document.images["img_name"].src='notyet.asp?id=<%=id%>&cd=yes&dates=<%=dates%>&shipcharge='+document.forms[0].shipcharge.value+'&shipping='+document.forms[0].shipping.value+'&rnd='+(Math.round()*99999)

first make sure you have

<img src="some.gif" name="img_name" style="position:absolute;visibility:hidden">

each query string which is sent up to the server via IMG must be inside the escape() function like this


escape(document.forms[0].shipping.value)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

829 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