Change the & ampersond to , comma as proposed above and change slightly your JavaScript function:
Main Topics
Browse All TopicsI've been using the code below to pass one variable from one page to the other:
I'm using Coldfusion flash forms on the page. The page calls the "tagging" cfsavecontent:
<cfsavecontent variable="tagging">
var somevar = poID.text;
getURL("javascript:newWin3
</cfsavecontent>
The cfsavecontent uses the script below to open an new window and pass the variables:
<SCRIPT type="text/javascript">
void function newWin3(poID){
var MyPage = "tagging.cfm?poID=" + poID;
window.open(MyPage,'mywind
}
</SCRIPT>
The code doesn't work when passing multiple variables:
I've tried:
<cfsavecontent variable="attachmnt">
var somevar = poID.text;
var somsub = subject.text;
getURL("javascript:newWin2
</cfsavecontent>
<SCRIPT type="text/javascript">
void function newWin2(poID, subject){
var MyPage = "attachments.cfm?ID=" + poID + "&sb=" + subject;
window.open(MyPage,'mywind
}
</SCRIPT>
Is there a way this code can be modified so that it can pass multiple variables to another page?
I'd appreciate your help!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: ryancysPosted on 2009-04-09 at 08:05:08ID: 24107882
try:
('" + somevar + "', '" + somsub +"');")
<cfsavecontent variable="attachmnt">
var somevar = poID.text;
var somsub = subject.text;
getURL("javascript:newWin2
</cfsavecontent>