November 8, 200817 yr Hi everyone, I want to be able to include one menu in everyone of my web pages using php include, which is easey enough!! But I want the user to see the link that they are currently on, see my website that I'm working on to see the example, http://www.highwoodhealth.org/test/ See that once you have clicked on one of the menu links and the page loads up, the link appears to be deactivated (although only the color and cursor have changed!!).. Can I do this with a java script?? but with only one menu file that is included into all the pages??? I think that it is clearer for a visitor to navigate if they can see which page they are on... thanks for any help Cheers Emmanuel
November 9, 200817 yr This can be done using javascript. I am not sure if you have Dreamweaver CS3, but it has the SPRY widgets that are contained in the program. Once you become fimilar with the spry menu widget you will want to then create a seperate page in your include folder, and name it menu.php. Once that has been done, put the menu code in there. Only put the menu code, dont put the heading script or anything else except the javascript that goes in the body. This is kind of like using an iframe except without the frame. Now put the include on the index.php page that links to the menu.php. Also please be sure that you also include the <head> javascript information on the page. This should work, let me know if you have any further questions.
November 9, 200817 yr Author This can be done using javascript. I am not sure if you have Dreamweaver CS3, but it has the SPRY widgets that are contained in the program. Once you become fimilar with the spry menu widget you will want to then create a seperate page in your include folder, and name it menu.php. Once that has been done, put the menu code in there. Only put the menu code, dont put the heading script or anything else except the javascript that goes in the body. This is kind of like using an iframe except without the frame. Now put the include on the index.php page that links to the menu.php. Also please be sure that you also include the <head> javascript information on the page. This should work, let me know if you have any further questions. thanks, I should be able to include the file ok, it is just that I need a script that can work from one file and that will change when user clicks on it and takes it to another page... Thanks for help Emmanuel
November 9, 200817 yr thanks, I should be able to include the file ok, it is just that I need a script that can work from one file and that will change when user clicks on it and takes it to another page... Thanks for help Emmanuel Right, but it will work only if you have the menu framework inside the menu.php and the script ref'd properly on each page. This should be fine when someone clicks on a different page.
November 11, 200817 yr Author Right, but it will work only if you have the menu framework inside the menu.php and the script ref'd properly on each page. This should be fine when someone clicks on a different page. OK, I'm only just trying to learn php and java code, so is there any way you can help me?
November 11, 200817 yr I will see what I can put together, i will get back with on everything. OK, I'm only just trying to learn php and java code, so is there any way you can help me?
November 11, 200817 yr Ok, here is what I have. I created a index.php and use a php include. <?php include('menu.php'); ?> This means the php include will call for the menu.php to be put in the index.php. This is kinda like using an iframe, but with out the frame. So now you can put anything in the menu.php page and it will show up on the index.php. I already created a sample, take a look at how I used the php include to show the horizontal spry menu. Let me know if you have any questions. test.zip
November 12, 200817 yr Author Ok, here is what I have. I created a index.php and use a php include. <?php include('menu.php'); ?> This means the php include will call for the menu.php to be put in the index.php. This is kinda like using an iframe, but with out the frame. So now you can put anything in the menu.php page and it will show up on the index.php. I already created a sample, take a look at how I used the php include to show the horizontal spry menu. Let me know if you have any questions. Thanks for your help I'll put this in my website! Cheers Emmanuel
Create an account or sign in to comment