Hello,
If this is the wrong place to post this question I apologize.
I am working on a Live Help Program that is written in PHP. The following is the PHP Code as I have it set up to show the Online or Offline Image. This works fine using a PHP Include script in .php pages. <? include ("livehelp/online.php") ?>
I Guess I am actually looking for the required Java Script to be able to include the online - offline image into a html page (.html)..
<script language="JavaScript">
<!--
function openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
<?
include('config.php');
//Url to livehelp
$url="www.domain_here";
$query = "SELECT * FROM admin";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
if ($row[login] == '1'){
echo ("<a href=\"#\" onClick=\"openBrWindow('http://$url/livehelp/user.php','','status=no,scrollbars=no,width=525,height=375')\"><img src=\"http://$url/images/online.gif\" border=\"0\"></a>");
}
elseif($row[login] == '0'){
echo ("<a href=\"#\" onClick=\"openBrWindow('http://$url/livehelp/user.php','','status=no,scrollbars=no,width=525,height=375')\"><img src=\"http://$url/images/offline.gif\" border=\"0\"></a>");
}
}
?>
My Goal is to add the required Java Script so it can be called into HTML pages using
<script language="JavaScript" src="online_js.php"></script>
Or something like that....
Any Help would be Greatly appreciated...