?
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
Medium Priority
?
184 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
[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
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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-…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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

770 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