web dev question (javascript, php)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheMob
    Confirmed User
    • Jan 2003
    • 8584

    #1

    web dev question (javascript, php)

    I have a menu that I'm including via PHP..this menu uses JS rollovers. I would like to be able to highlight the correct part of the menu, depending on current URL location of the browser..

    doable? in JS? php?

    thanks!

    Code:
    			<a href="index.php?mn=gallery"
    				onmouseover="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;"
    				onmouseout="changeImages('menu_04', '<?=RURL;?>images/menu_04.gif'); return true;"
    				onmousedown="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;"
    				onmouseup="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;">
    				<img name="menu_04" src="
  • Nikita Khrushchev
    Registered User
    • Oct 2005
    • 17

    #2
    Just use mn or QUERY_STRING

    example
    Code:
    			<a href="index.php?mn=gallery"
    				onmouseover="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;"
    				onmouseout="changeImages('menu_04', '<?=RURL;?>images/menu_04.gif'); return true;"
    				onmousedown="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;"
    				onmouseup="changeImages('menu_04', '<?=RURL;?>images/menu_04-over.gif'); return true;">
    				<img name="menu_04" src="
    <?php
    if($_GET['mn'] hahahaha 'gallery')
    {
    echo 'menu_04-over.jpg">';
    }
    else
    {
    echo 'menu_04.jpg">';
    }
    ?>
    Last edited by Nikita Khrushchev; 10-10-2005, 07:31 PM.
    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, you may use a 624x80 instead of a 120x60. Let me repeat... A 120 x 60 button and no more that 3 lines of DEFAULT SIZE AND COLOR text.

    Comment

    Working...