Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
185 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

Independent Software Vendors: 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

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…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

636 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