Hello Everyone,
I have a new website that I am working on: http://www.madtownservices.com . I am going to keep updating this as I add more and more services to it. This presents a major problem for me because everytime I add a new link to the menubar on the left I have to update that for each page, a very time consuming process. I am wondering if there is a type of script (maybe javascript) that would allow me to display my menubar (with images and rollovers) from an external doc, so when I want to update it I could just update one page rather than all of them? This would be similar to CSS. I do not want to use frames on the site, I know that would be an easy solution.
Thanks.
+ Reply to Thread
Results 1 to 13 of 13
-
-
If you site uses Frontpage extensions, use the "include" command. Setup a seperate html page for your menu, then "include" that page in all your other pages. From frontpage create a seperate menu html doc and save it. Then in all the other pages use CCS or tables. Then from frontpage got to insert/web componate/include content/page. select the menu html for the cell you want it in
If your site does not support frontpage extensions, then you can use "shtml" to include content from another html page. http://httpd.apache.org/docs/howto/ssi.html -
You could put your menu in a file, say menu.js, then reference it in every page like so
Code:<SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>
-
Originally Posted by Supreme2k
Judging by his code....I think he has enough caffine for everyone -
Ok thanks for all the info guys! I have a couple questions. If I were to use the include with php script how would I format my external menu file? Would I just make a normal webpage with my image links and rollovers? Or do I need to use any special coding with php?
As far as using:
<SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>
http://javascript.internet.com/navigation/easy-multi-page-navigation.html
but I could only get it to work with text links, the image links with rollover that I want to use wouldn't work. Is there a way to make them work? Here's my page source:
<td rowspan="3" colspan="1" style="vertical-align: top;">[img]images/home.jpg[/img]
[img]images/citywide.jpg[/img]
<a href="http://www.madtownservices.com/additions.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Additions','','images/additions_high.jpg',1)">
</a>[img]images/additions.jpg[/img]
[img]images/radiotradio.jpg[/img]
[img]images/westside.jpg[/img]
[img]images/yardwork.jpg[/img]
[img]images/computerrepair.jpg[/img]
[img]images/repair.jpg[/img]
[img]images/virus.jpg[/img]
[img]images/video.jpg[/img]
[img]images/webpage.jpg[/img]
[img]images/other.jpg[/img]
[img]images/contact.jpg[/img]
[img]images/links.jpg[/img]
</td> -
since you have php, it's as simple as
Code:<?include("menu.htm");?>
If you want to do it in javascript, you have to start each line with
document.write("
then put a back-slask before every quotation mark (except the first and last):
Code:document.write("<a href=\"www.videohelp.com\">");
document.write("<a href='www.videohelp.com'>");
then end each line with "); -
Originally Posted by Garibaldi
http://javascript.internet.com/navigation/easy-multi-page-navigation.html
but I could only get it to work with text links, the image links with rollover that I want to use wouldn't work. Is there a way to make them work? Here's my page source:
<td rowspan="3" colspan="1" style="vertical-align: top;">[img]images/home.jpg[/img]
[img]images/citywide.jpg[/img]
<a href="http://www.madtownservices.com/additions.html"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Additions','','images/additions_high.jpg',1)">
</a>[img]images/additions.jpg[/img]
[img]images/radiotradio.jpg[/img]
[img]images/westside.jpg[/img]
[img]images/yardwork.jpg[/img]
[img]images/computerrepair.jpg[/img]
[img]images/repair.jpg[/img]
[img]images/virus.jpg[/img]
[img]images/video.jpg[/img]
[img]images/webpage.jpg[/img]
[img]images/other.jpg[/img]
[img]images/contact.jpg[/img]
[img]images/links.jpg[/img]
</td> -
Originally Posted by Supreme2k
Thanks alot! 8) -
JMHO
800x600 is the standard.
I would scale to that....looks a too wide -
Originally Posted by stiltman
-
Originally Posted by Garibaldi
No it all fits, just I like to see pages sized to 8x6 thats all...My preference -
Originally Posted by Garibaldi
Similar Threads
-
Adding controls to a swf (then adding to website)
By AshleyQuick in forum Newbie / General discussionsReplies: 6Last Post: 14th Oct 2011, 03:02 -
New to this site
By hershfelder2000 in forum Newbie / General discussionsReplies: 0Last Post: 13th Feb 2011, 18:56 -
What's this site all about ???
By bendixG15 in forum Off topicReplies: 8Last Post: 15th Aug 2010, 01:17 -
New to this site - Hi
By andrewmpalmer2003 in forum Newbie / General discussionsReplies: 5Last Post: 10th Nov 2008, 18:43 -
Ripit4me site
By mickish in forum DVD RippingReplies: 58Last Post: 14th Jun 2007, 04:06