JLG Posted January 17, 2006 Share Posted January 17, 2006 I'm really not good at PHP or JavaScript so i'm hoping someone will be able to cure this problem really easily. I've done searches but even this simple stuff is a bit over my head.I have a menu which when clicked on shows submenu item underneith. When a sub menu item is clicked on it goes to another page (without a menu on), on that page i have a link saying back. When they go back to the original page with the menu on i would like the sub menu to still be shown.at the moment i have this piece of code on the menu page: <?phpif(!isset($Menu)) {$Menu = "1";} print "<script language=\"javascript1.2\" type=\"text/javascript\">toggleview('menu".$Menu."')</script>\n";?> this code opens the submenu when i go to the page but i only want it open the submenu when /intro.php?Menu=1 is in the URL not when it is just /intro.php (or anything else).I can't put links up cuz i'm on an internal intranet system, i hope this make sense to someone. Please help. Link to comment Share on other sites More sharing options...
JLG Posted January 18, 2006 Author Share Posted January 18, 2006 Doesn't matter i cured it with:<?phpif(isset($_GET['Menu'])) { print "<script language=\"javascript1.2\" type=\"text/javascript\">toggleview('menu".$_GET['Menu']."')</script>\n";}?>I was just being thick. Link to comment Share on other sites More sharing options...
zanfranceschi Posted January 19, 2006 Share Posted January 19, 2006 remember you can use $_REQUEST[] instead of $_GET. I'm not sure, but i guess $_GET only works with forms... Link to comment Share on other sites More sharing options...
JLG Posted January 19, 2006 Author Share Posted January 19, 2006 I'll remember that for next time but for now $_GET works and it's not using any forms just the url. Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now