Results 1 to 3 of 3

Thread: help

  1. #1
    Join Date
    Oct 2018
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help

    how can i make it so that all i have to do is edit one page & the menus on both sides of each of my pages changes? because addind 1 affiliate means i have to go through every page on my site, is there a way i can change it so all i have 2 do is change 1 page? (the web host won't let me use phtml or shtml)

  2. #2
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    You could do it by running a JavaScript program inside your page but using either PHP or shtml is the best way to do this.

    Your best option is to change your hosting company to one that will allow either PHP or shtml.

    If you do want to use JavaScript & jQuery then it is probably best to look at this page.
    Last edited by styxlawyer; 10-23-2018 at 09:30 AM. Reason: Added link.

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,875
    Thanks
    49
    Thanked 263 Times in 255 Posts
    Blog Entries
    56

    Default

    There are many ways to do it. Here's one method that doesn't rely on any library. Put your menu in an external file, for example menu.html, then on the page where you want to include the external file (=menu.html) put:
    Code:
    <div>
    <iframe src="menu.html" style="width:0; height:0; border:0; opacity: 0; " onload="this.parentNode.innerHTML=this.contentWindow.document.documentElement.innerHTML"></iframe>
    </div>
    The CSS and javascript that make the menu work must be put in the main file.

    Important:
    With certain browsers, this does not work on your hard disk. But on the Internet it works everywhere.
    Last edited by molendijk; 10-23-2018 at 01:02 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •