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
That's what I do for clients with bare-bones servers (simple HTML only). Of course you could do MUCH more with asp, php, and others (like checking if the user is logged in, preferences, etc.)Code:<SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>
-
Yeah or you could use that coffee substituteOriginally 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:
I tried using this script:<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):
Alternately, you can use single quotes:Code:document.write("<a href=\"www.videohelp.com\">");
document.write("<a href='www.videohelp.com'>");
then end each line with "); -
I tried using this script: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:
You need to also include the script that in the <head> tag to use that.<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> -
Thanks alot I used the php script and got it to work: www.madtownservices.com , what do you think?Originally Posted by Supreme2k
Thanks alot! 8) -
JMHO
800x600 is the standard.
I would scale to that....looks a too wide -
Yeah it is a little wide, but the page should all display fine, I've set the value to width=100% so no matter your browser size it should resize. The reason it is so big is there is a column for the menu, one for the pics, and one for text. Unfortunately its hard to make this smaller without compromising one of those. Why, does it not all fit in your browser?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 -
The table width attribute is 917px. Set it to 780px (you gotta leave space for scroll bars etc.) or 100%. I didn't look at what the TR or TD widths were but if they are larger than what the table width is they will supersede the table width. It's been a while but I think you can set the menu TD width as a static size then set the content TD size to 99%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, 04:02 -
New to this site
By hershfelder2000 in forum Newbie / General discussionsReplies: 0Last Post: 13th Feb 2011, 19:56 -
What's this site all about ???
By bendixG15 in forum Off topicReplies: 8Last Post: 15th Aug 2010, 02:17 -
New to this site - Hi
By andrewmpalmer2003 in forum Newbie / General discussionsReplies: 5Last Post: 10th Nov 2008, 19:43 -
Ripit4me site
By mickish in forum DVD RippingReplies: 58Last Post: 14th Jun 2007, 05:06



Quote