Jtech Posted January 14, 2007 Share Posted January 14, 2007 Ok here's the deal... If i have a toolbar with a popdown menu in like 20 different pages ... with links on it an after finishin putting it on every page i realize i want to change a link on the tool bar .. then i have to go through every page to change this link .. god thats tedious .. well any how my question is .. is it posible to have an external page with the toolbar an all the divs in it as well for the pop down menu ..and the positions as well .. so all i have to do is go in an change just that one page . an it would effect/change all them pages... ??? Quote Link to comment Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Yes, you can do that. Copy all of your JavaScript code into one file and call it something like "menu.js" Then include the file on your web page where you would like the menu placed. One place to make all changes, "menu.js". Quote Link to comment Share on other sites More sharing options...
franklyn Posted January 14, 2007 Share Posted January 14, 2007 make the menu in a php file and then include the php in all your pages.heres a tut on how to do it.http://www.tizag.com/phpT/include.phpedit: or what scotmcc said :P lol Quote Link to comment Share on other sites More sharing options...
Jtech Posted January 14, 2007 Author Share Posted January 14, 2007 Good advice but not what i was looking for .. fair enough that will let me beable to change the functions of the popup menu on every page but what if i wanted to change a anchor/ <a href> on every page .. heres an e.g__________________________________link1 | link2 |link3__________________________________thats on 20 pages . so lets say i wanted to change link2 would i be able to make an external page to beable to change a normal anchoror will i just have to go through every page .... thnks for the replys anyhow Quote Link to comment Share on other sites More sharing options...
fenway Posted January 15, 2007 Share Posted January 15, 2007 Huh? Quote Link to comment Share on other sites More sharing options...
Jtech Posted January 15, 2007 Author Share Posted January 15, 2007 its ok now i worked somthing out Quote Link to comment Share on other sites More sharing options...
fenway Posted January 15, 2007 Share Posted January 15, 2007 Care to elaborate for the rest of us? Quote Link to comment Share on other sites More sharing options...
Jtech Posted January 15, 2007 Author Share Posted January 15, 2007 well its more am in the making of trying somthing out .. i will have an external.js page which will write html in to what ever page has the <script src=""> tag// and i will get it to write in to a div which will get positioned by an other external.css.. its the only way i can think of changing an normal anchor called media to information in every page ... Quote Link to comment Share on other sites More sharing options...
fenway Posted January 15, 2007 Share Posted January 15, 2007 Well, assuming you put the script block in the right place, you can document.write() inside a div named whatever you want. Quote Link to comment Share on other sites More sharing options...
Jtech Posted January 15, 2007 Author Share Posted January 15, 2007 K cool ... just to let u know what am on about heres an eg ..you know at the top of the page of php freaks where it has __________________________________home|help|search|profie ect....__________________________________an that is maby on every page on this site like 1000s of pages .what will he do when ever he wants to change search to look.. its somthing like that which is my problem .. so do u have any better ideas Quote Link to comment Share on other sites More sharing options...
fenway Posted January 16, 2007 Share Posted January 16, 2007 Well, any type of include will be just fine for this, server-side or otherwise. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.