Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Switch Menu - Questions

  1. #11
    Join Date
    May 2006
    Location
    NE PA USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thats alright, I don't know how much php you understand, but this is what I came up with and it seems to work

    Code:
    <html>
    <head>
    ...
    </head>
    <body <?php 
    if (strstr(dirname($_SERVER['PHP_SELF']),"/schools/lathrop") && ([function that checks for new pictures])){ echo "onload=\"SwitchMenu('sub4')\"";}
    elseif (strstr(dirname($_SERVER['PHP_SELF']),"/schools/choconut") && ([function that checks for new pictures])){ echo "onload=\"SwitchMenu('sub6')\"";}
    elseif (strstr(dirname($_SERVER['PHP_SELF']),"/schools/highschool") && ([function that checks for new pictures])){ echo "onload=\"SwitchMenu('sub8')\"";}
    elseif (strstr(dirname($_SERVER['PHP_SELF']),"/athletics") && ([function that checks for new pictures])){ echo "onload=\"SwitchMenu('sub9')\"";} 
    elseif (is_current_news("employment")){echo "onload=\"SwitchMenu('sub12')\"";}?>>
    
    ...
    All the menu stuff
    
    </body>
    <html>

    But my problem now is when the page loads, it does not change the [+] to a [-]. You can see on the website, www.masd.info, that the symbols are backwards.

    In the part of the php where it says [ echo "onload=\"SwitchMenu('sub4')\" ], that is the part that puts that line of code in the body syntax. I changed it to [ echo "onload=\"SwitchMenu('sub4', this)\" ] to see if it would change the image. Note: the [, this]. This did not work. Do you have any ideas?

    -Paul
    www.montroseareasd.k12.pa.us
    Last edited by theycallmepj; 05-23-2006 at 06:11 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •