Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JS plugin to load list items from file?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #45426
    bcintegrity1
    Participant

    I have the same unordered lists on MANY pages. Can the list be placed in a separate file, just like the css stylesheet, and then “imported” into a div withing the body?

    Is there a plugin for this? I know nothing about JavaScript.

    If so, will removing the lists from the actual web pages effect SEO?

    #138252
    bcintegrity1
    Participant
    #138253
    TheDoc
    Member

    Don’t want to use Javascript for this. Preferably you would use PHP:

    Then on your server have list.php that has your HTML in it.

    #138531
    bcintegrity1
    Participant

    @TheDoc , I’ve done what you suggested…Thanks!!! The page below has the links in the body (top-right) “Service Areas”, and the links work fine.

    http://integritycontractingofva.com/Pest-Control-VA.php

    This page has the include file (top-right) “Service Areas”, and the links don’t work.

    http://integritycontractingofva.com/Pest-Control-in-Amelia%2C-VA—Amelia-Court-House%2C-VA—Jetersville%2C-VA.php

    I noticed that the file names are the same for both, but the page title doesn’t appear the same on hover (bottom left corner), if that helps. Do I need to add something in the include file?

    Again, thank you for your help. You’re a life saver!

    #138789
    bcintegrity1
    Participant

    To clarify, the ‘include’ works, but the links don’t.

    I use RVSitebuilder, which displays a file number (i.e. ahref=”12345.com”). On the live site the file numbers are replaced with the name that appears in the URL address bar.

    The problem is, the links from the ‘include’ file keep their numerical value when loaded, and are not replaced with the page name. The links do not work. Is there something I need to add to the ‘include’ file to fix this?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.