Hi everyone,

How can I get around my problem? I have a couple pages that I would like to have 
buttons where the button and background changes when the javascript mouseover event 
happens. My code works fine if the page is .html, but when I try it as php, the 
mouseovers no longer work.

I have the mouseover in another php file which is included in the php file that is 
doing the outputing.


Here is a shortened file:

<?php
include('format.php')

if ($_SESSION['auth'] == true)
{
  echo <<<EndHTML
<html>
<body>
<table>
EndHTML;

if ($_SESSION['userlist'] == 'all')
{
  echo "<tr $tableheaderformat><td>$_SESSION['username'] is logged in</td></tr>";
}

  <tr>
    <td>text, blah blah blah</td>
     more
  </tr>
</table>
</body>
</html>
EndHTML
}

?>

format.php:

$tableheaderformat = <<<EndFormat
id="JMTS" bgcolor="#ABCED6" onmouseover="if(document.layers) { 
document.layers['JMTS'].bgColor='#EEEEEE' } else { if(document.all) { 
document.all['JMTS'].
style.background='#EEEEEE' } else { if(this.style) { this.style.background='#EEEEEE' } 
} }" onmouseout="if(document.layers) { document.layers['JMTS'].bgColor=
'#ABCED6' } else { if(document.all) { document.all['JMTS'].style.background='#ABCED6' 
} else { if(this.style) { this.style.background='#ABCED6' } } }
EndFormat;





Like I said, if I put it in a regular html file, it works fine. How can I make this 
work?

Thanks,
Jake

Reply via email to