March 18, 200818 yr I have created a pull down menu and have it all arranged how I want it to display. The menu is on a lot of pages and rather than me having to update them all is there a way I can link the pull down menu to a centralised list of menu titles and their links? Any ideas would be great
March 18, 200818 yr I have created a pull down menu and have it all arranged how I want it to display. The menu is on a lot of pages and rather than me having to update them all is there a way I can link the pull down menu to a centralised list of menu titles and their links? Any ideas would be great I dont get what oyur saying fully, Try looking up 'PHP INCLUDES' hope this helps pete
March 18, 200818 yr Author I kind of get what php includes does, however I need to link it remotely to my list that will be updated weekly. Here is my code I use for the pulldown menu "<table cellspacing="0" cellpadding="0" width="603" border="0"> <tbody> <tr> <td width="603" height="34"><img height="34" alt="" src="http://www.propstore.com/content/propstorecollection/dropdown/dropdownimage_01.jpg" width="603" /></td> </tr> </tbody> </table> <table cellspacing="0" cellpadding="0" width="603" border="0"> <tbody> <tr> <td width="233" height="38" rowspan="2"><img height="38" alt="" src="http://www.propstore.com/content/propstorecollection/dropdown/dropdownimage_02.jpg" width="233" /></td> <td bgcolor="#23469a" height="32"> <div align="center"> <form style="MARGIN: 0px" name="jump"> <select name="menu"> <option value="http://www.propstore.com/aliens.htm" selected="selected">Aliens</option> <option value="http://www.propstore.com/gladiator.htm">Gladiator</option> <option value="http://www.propstore.com/redplanet.htm">Redplanet</option> <option value="http://www.propstore.com/superman.htm">Superman</option> </select><input onclick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value " type="button" value="GO" /> </form> </div> </td> <td width="232" height="38" rowspan="2"><img height="38" alt="" src="http://www.propstore.com/content/propstorecollection/dropdown/dropdownimage_04.jpg" width="232" /></td> </tr> <tr> <td height="6"><img height="6" alt="" src="http://www.propstore.com/content/propstorecollection/dropdown/dropdownimage_05.jpg" width="138" /></td> </tr> </tbody> </table>" The part that has the "<option vlaue" is the area i assume i would need the php includes i just don't know how to link it to the php i created. Is this any clearer for you guys?
March 18, 200818 yr Save the entire snippet of code in a separate file (let's call it navmenu.html) - not just the option value part. Then, where that code was on your original HTML page, put this: <?php include("navmenu.html"); ?> As long as your web host supports PHP, you're good to go. Whenever you want to update your nav menu list, just update the navmenu.html file and it will automatically change on all of your pages (assuming you've put the above code on all the relevant pages).
March 18, 200818 yr Save the entire snippet of code in a separate file (let's call it navmenu.html) - not just the option value part. Then, where that code was on your original HTML page, put this: <?php include("navmenu.html"); ?> As long as your web host supports PHP, you're good to go. Whenever you want to update your nav menu list, just update the navmenu.html file and it will automatically change on all of your pages (assuming you've put the above code on all the relevant pages). to save any hastle use <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> just in case, (inside all pages)
March 18, 200818 yr Author With our site I need to remotely link to the file would this work <?php include("http://www.propstore.com/content/navmenu.html"); ?>
March 18, 200818 yr With our site I need to remotely link to the file would this work <?php include("http://www.propstore.com/content/navmenu.html"); ?> Yes, that should work
March 18, 200818 yr Author hmm tried it with the hole code that runs the pull down menu and just get a blank section in the drop down
March 19, 200818 yr Author damn server does not use php What else can I do?? Thanks for all your input so far
Create an account or sign in to comment