In my PHP code:
I have a var:
$server = 'How I do I use that var in the following JavaScript so that I don't have to hard code the server ip in it?
-----------------snip----------------------------
<script LANGUAGE="JavaScript"><!--
function OpnWindSize(w,h) {
var Ooooorl = " var WinTitle = "'" + w + "x" + h + "'";
var WinParams = "'toolbar=no,status=no,scrollbars=no,menubar=no,"
WinParams += "directories=no,location=no,resizable=yes,width=" + w ;
WinParams += ",height=" + h + "'";
if (Ooooorl.value == "" || Ooooorl.value == " enter a URL to open..."Ooooorl.focus();Ooooorl.select();return}
window.open(" null, WinParams);
}
// -->
-------------------snip-------------------
I have a var:
$server = 'How I do I use that var in the following JavaScript so that I don't have to hard code the server ip in it?
-----------------snip----------------------------
<script LANGUAGE="JavaScript"><!--
function OpnWindSize(w,h) {
var Ooooorl = " var WinTitle = "'" + w + "x" + h + "'";
var WinParams = "'toolbar=no,status=no,scrollbars=no,menubar=no,"
WinParams += "directories=no,location=no,resizable=yes,width=" + w ;
WinParams += ",height=" + h + "'";
if (Ooooorl.value == "" || Ooooorl.value == " enter a URL to open..."Ooooorl.focus();Ooooorl.select();return}
window.open(" null, WinParams);
}
// -->
-------------------snip-------------------