VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. 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.
    Quote Quote  
  2. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    All you need is your menu in a separate file, and then just put an include statement in each file. THen when you update the menu file, the changes are "replicated" across all pages.
    If in doubt, Google it.
    Quote Quote  
  3. 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
    tgpo famous MAC commercial, You be the judge?
    Originally Posted by jagabo
    I use the FixEverythingThat'sWrongWithThisVideo() filter. Works perfectly every time.
    Quote Quote  
  4. Greetings Supreme2k's Avatar
    Join Date
    Feb 2003
    Location
    Right Here, Right Now
    Search Comp PM
    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>
    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.)
    Quote Quote  
  5. Originally Posted by Supreme2k
    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>
    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.)
    Yeah or you could use that coffee substitute


    Judging by his code....I think he has enough caffine for everyone
    tgpo famous MAC commercial, You be the judge?
    Originally Posted by jagabo
    I use the FixEverythingThat'sWrongWithThisVideo() filter. Works perfectly every time.
    Quote Quote  
  6. 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>
    I tried using this 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>
    Quote Quote  
  7. Greetings Supreme2k's Avatar
    Join Date
    Feb 2003
    Location
    Right Here, Right Now
    Search Comp PM
    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\">");
    Alternately, you can use single quotes:
    document.write("<a href='www.videohelp.com'>");

    then end each line with ");
    Quote Quote  
  8. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Originally Posted by Garibaldi

    As far as using:
    <SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>
    I tried using this 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>
    You need to also include the script that in the <head> tag to use that.
    Quote Quote  
  9. Originally Posted by Supreme2k
    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\">");
    Alternately, you can use single quotes:
    document.write("<a href='www.videohelp.com'>");

    then end each line with ");
    Thanks alot I used the php script and got it to work: www.madtownservices.com , what do you think?
    Thanks alot! 8)
    Quote Quote  
  10. JMHO
    800x600 is the standard.
    I would scale to that....looks a too wide
    tgpo famous MAC commercial, You be the judge?
    Originally Posted by jagabo
    I use the FixEverythingThat'sWrongWithThisVideo() filter. Works perfectly every time.
    Quote Quote  
  11. Originally Posted by stiltman
    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?
    Quote Quote  
  12. Originally Posted by Garibaldi
    Originally Posted by stiltman
    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?

    No it all fits, just I like to see pages sized to 8x6 thats all...My preference
    tgpo famous MAC commercial, You be the judge?
    Originally Posted by jagabo
    I use the FixEverythingThat'sWrongWithThisVideo() filter. Works perfectly every time.
    Quote Quote  
  13. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Originally Posted by Garibaldi
    Originally Posted by stiltman
    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?
    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%
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!