Re: Javascript Mouseover Help

From: Date: Thu, 18 Mar 2004 07:36:42 +0000
Subject: Re: Javascript Mouseover Help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180792@lists.php.net to get a copy of this message
Hi, Thursday, March 18, 2004, 1:08:27 PM, you wrote: JM> Hi everyone, JM> How can I get around my problem? I have a couple pages that I JM> would like to have buttons where the button and background changes JM> when the javascript mouseover event happens. My code works fine if JM> the page is .html, but when I try it as php, the mouseovers no JM> longer work. JM> I have the mouseover in another php file which is included in JM> the php file that is doing the outputing. JM> Here is a shortened file: JM> <?php JM> include('format.php') JM> if ($_SESSION['auth'] == true) JM> { JM> echo <<<EndHTML JM> <html> JM> <body> JM> <table> JM> EndHTML; JM> if ($_SESSION['userlist'] == 'all') JM> { JM> echo "<tr $tableheaderformat><td>$_SESSION['username'] is logged JM> in</td></tr>"; JM> } JM> <tr> JM> <td>text, blah blah blah</td> JM> more JM> </tr> JM> </table> JM> </body> JM> </html> JM> EndHTML JM> } ?>> JM> format.php: JM> $tableheaderformat = <<<EndFormat JM> id="JMTS" bgcolor="#ABCED6" onmouseover="if(document.layers) JM> { document.layers['JMTS'].bgColor='#EEEEEE' } else { JM> if(document.all) { document.all['JMTS']. JM> style.background='#EEEEEE' } else { if(this.style) { JM> this.style.background='#EEEEEE' } } }" JM> onmouseout="if(document.layers) { document.layers['JMTS'].bgColor= JM> '#ABCED6' } else { if(document.all) { JM> document.all['JMTS'].style.background='#ABCED6' } else { JM> if(this.style) { this.style.background='#ABCED6' } } } JM> EndFormat; JM> Like I said, if I put it in a regular html file, it works JM> fine. How can I make this work? JM> Thanks, JM> Jake Your missing a " at the end of mouseout -- regards, Tom

« previous php.general (#180792) next »