Jump to content

Recommended Posts

Hi.

How can i write this?. I have a page in a iframe it gets the contents of div from parent page, and outputs it to the title of a window script. I cant get to output the javascript var it only shows as +windowtitle+ .

 

here is my code: (The problem is with window title it outputs as +windowtitle+ )

 

<script type="text/javascript">

var windowtitle = document.getElementById(\''.$username.'id\').innerHTML; // i also used plain text to test this but still get +windowtitle+

 

var url_destination = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\';

 

var url_ajax = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\';

 

var online = "<a href=\"javascript:void(0);\" onclick=\"parent.dhtmlwindow.open(\''.$username.'box\', \'div\', \''.$profemail2.'\', \''+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>";

 

var offline = \'<span style=\"padding-left:0px; width:100%; background-color:transparent; color:#ff0033; font-size:11px; text-decoration:none; text-align:left\">CHAT OFFLINE</span>\';

 

document.write(\'<\' + \'script type="text/javascript" src="http://'.$host.'/chat/'.$username.'/'.$profemail2.'/chat2.js"></\' + \'script>\');

</script>

Sorry for that nicely pointed out about the java/javascript

here is my code again: (the [m][/m] tags have the php symbol on them so honest mistake there)

<script type="text/javascript">
var windowtitle = document.getElementById(\''.$username.'id\').innerHTML; // i also used plain text to test this but still get +windowtitle+var 

url_destination = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\';

var url_ajax = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\';

var online = "<a href=\"javascript:void(0);\" onclick=\"parent.dhtmlwindow.open(\''.$username.'box\', \'div\', \''.$profemail2.'\', \''+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>";

var offline = \'<span style=\"padding-left:0px; width:100%; background-color:transparent; color:#ff0033; font-size:11px; text-decoration:none; text-align:left\">CHAT OFFLINE</span>\';

document.write(\'<\' + \'script type="text/javascript" src="http://'.$host.'/chat/'.$username.'/'.$profemail2.'/chat2.js"></\' + \'script>\');</script>()

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.