I have to pass a string variable created in php to Javascript function to open form child using open.window. I have code like this
<html>
<head>
<script LANGUAGE="JavaScript" TYPE="text/javascript">
function openWindow(v){
WREF = window.open("test2.html?cad=e&cid="+v,"koreksi","width=550,height=350,top=50");
if(!WREF.opener){ WREF.opener = this.window; }
}
</script>
</head>
<body>
<?php $var='Red'; ?>
<a HREF="javascript:void(0);" onClick="openWindow(<?php $var='Red'; ?>);">Open the window</a>
</body>
</html>
By those code, i hope i can get an address like this http://localhost/adduser.php?cad=e&cid=red
Can you help me ? ( sorry i can't describe clearly for my q )