It's hard to tell from just the code above what you're trying to do. In general you can use a server side language like PHP to output any HTML, JavaScript included. To make things cleaner for you though, you should only output the portion of the JavaScript you need to dynamically, and leave the rest alone. So for example, in the below JavaScript code, only the URL of the popup window is dynamically generated using PHP:
Code:
<script type="text/javascript">
var googlewin=dhtmlwindow.open("googlebox", "iframe", "<? echo $popurl ?>", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
googlewin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return window.confirm("Close window 1?")
}
</script>
Bookmarks