Reputation: 625
I need a bit of help with quotes in javascript function
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?POST_IN1="+value+","mywindow","width=800,height=600") ;
}
thanks!
Upvotes: 1
Views: 383
Reputation: 27561
"rpt_Distance.php?POST_IN1=" + value, "mywindow", "width=800,height=600"
Upvotes: 3
Reputation: 162
This code should read to be correct - leaving out the +" after value
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
}
Upvotes: 1
Reputation: 81577
You have one +"
that must be removed:
window.open("rpt_Distance.php?$POST_IN1="+value+","mywindow","width=800,height=600") ;
must be replaced by:
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
Upvotes: 1
Reputation: 4901
It helps if you ask a question, not just post a snippet function. Are you trying to insert actual quotes? If so escape them with '\'.
EDIT: Hats off to Shoban for being able to read minds (and code) :).
Upvotes: 1
Reputation: 23016
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
}
I just removed +"
Upvotes: 1