JavaScript inside PHP<

liunx

Guest
Hello,
Is there something you have to include for JavaScript to work inside PHP?
I have this menu consisting of images, these images have simple OnMouseOver and onMouseOut functionalities, but I don't get them work. When you move your mouse over the menu button, the little square button on the side should change color.

In the browser source code it can be seen that the syntax for JavaScript is just right!

The code looks like this:

<?php
$menu_buttons=array ("img src=http://www.htmlforums.com/archive/index.php/\"img/etusivu.gif\"","img src=\"img/verkko.gif\"", "img src=\"img/konsultointi.gif\"", "img src=\"img/koulutus.gif\"", "img src=\"img/yhteys.gif\"");

for($x=0;$x<count($menu_buttons);$x++)
{
echo("<img src=http://www.htmlforums.com/archive/index.php/\"img/m_nelio.gif\" border=\"0\" valign=\"center\" name=\"ButtonSelect\"><a href=\"$PHP_SELF?page=$x\"onMouseOver=\"document.ButtonSelect.src='img/m_nelio_p.gif';\"onMouseOut=\"document.ButtonSelect.src='http://www.htmlforums.com/archive/index.php/img/m_nelio.gif';\"><$menu_buttons[$x] border=\"0\"><img src=http://www.htmlforums.com/archive/index.php/\"img/m_vali.gif\" border=\"0\">");
}
?>Dharma, Suomesta? Eip?né–¶
 
Back
Top