antonyf
01-15-2012, 11:09 AM
1) Script Title: Dhtml window script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/
3) Describe problem: Hi. I'm trying to dynamically name the dhtml window from the content of a div.. All this is easy enough. I just don't know how to output the javascript into the title of the dhtmlwindow.open script.
Notes:
- the script is echoed.
- the script is on a .php page
Here is my code:
<script type="text/javascript">
var windowtitle = document.getElementById(\''.$username.'id\').innerHTML; // this variable works
var online = "<a href=\"javascript:void(0);\" onclick=\"parent.dhtmlwindow.open(\''.$username.'box\', \'div\', \''.$profemail2.'\', document.write(windowtitle), \'width=224px,height=227px,left=200px,top=150px,resize=0,scrolling=0,center=1\'); return false\"><font style=\"padding-left:0px; width:100%; background-color:transparent;color:#000000; font-size:11px; text-decoration:none; text-align:left\">CHAT ONLINE</font></a>";
</script>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/
3) Describe problem: Hi. I'm trying to dynamically name the dhtml window from the content of a div.. All this is easy enough. I just don't know how to output the javascript into the title of the dhtmlwindow.open script.
Notes:
- the script is echoed.
- the script is on a .php page
Here is my code:
<script type="text/javascript">
var windowtitle = document.getElementById(\''.$username.'id\').innerHTML; // this variable works
var online = "<a href=\"javascript:void(0);\" onclick=\"parent.dhtmlwindow.open(\''.$username.'box\', \'div\', \''.$profemail2.'\', document.write(windowtitle), \'width=224px,height=227px,left=200px,top=150px,resize=0,scrolling=0,center=1\'); return false\"><font style=\"padding-left:0px; width:100%; background-color:transparent;color:#000000; font-size:11px; text-decoration:none; text-align:left\">CHAT ONLINE</font></a>";
</script>