Is there a way to make forms load externally

Discussion in 'HTML & Website Design' started by Pithdog, Jun 13, 2009.

  1. #1
    Hey. I use forms as to make drop down boxes, that contain links. But whenever I make a new page, I have to add that new page's link to 20+ forms, because I have 20+ pages.

    So my question is, is there a way I can have a external form, like CSS, and have it load when the page loads? That way I only have to change one thing. Like CSS.

    Example code:

    <form name="form" id="form2">
    <select name="jumpMenu2" id="jumpMenu2" onChange="MM_jumpMenu('parent',this,0)">
    <option value="" selected>Choose a Comic</option>
    <option value="http://www.tptcomics.com/nameless/latest.html">Latest</option>
    <option value="http://www.tptcomics.com/nameless/archive.html">Archive</option>
    <option value="http://www.tptcomics.com/nameless/comic01.html">Comic01</option>
    <option value="http://www.tptcomics.com/nameless/comic02.html">Comic02</option>
    </select>
    </form>

    Thankyou,
    Pithdog.
     
    Pithdog, Jun 13, 2009 IP
  2. Anduril66

    Anduril66 Well-Known Member

    Messages:
    390
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Yeah, it's called a Server Side Include. If your web server supports a scripting language like php or asp or ruby, its easy to add. You just put <?php include("form.html"); ?> in the pages where you want the form and put the form in form.html. I think you can also set up your web server to use Server Side Includes without a scripting language but I don't know how.
     
    Anduril66, Jun 13, 2009 IP
  3. Pithdog

    Pithdog Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can you give me an exact example of how the code would look? Or direct me to somewhere which has it?
     
    Pithdog, Jun 13, 2009 IP