39 users online (0 members and 39 guests)  

Thread: Inserting Html


  Results 1 to 4 of 4

Related

  1. inserting css into php pages?    Forum: CSS Forum
    Replies: 10
  2. Replies: 0
  3. Inserting system calculator    Forum: HTML Forum
    Replies: 0
  4. Replies: 1
  5. Error inserting javascript into php    Forum: PHP Forum
    Replies: 14
  1. #1
    luke242's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    2

    Inserting Html

    Hello,
    I am looking for a way to insert all the html code contained in another document when a different page loads. I have several pages and would like them to share the same table in the body. Is there a simple Javascipt, vbscript, or html command to do this?

    Typically I would use a database, but I am restricted to client side code only.

    Thanks for any help you'll can provide.

    ~Luke

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi Luke,

    If you are resticted to client-side only, then you will need to include a javascript that then document.writes your content out. Thats not good.

    otherwise, you can use an include. These rely on the page extension and the parse engine on the server.

    This thread has some links to include tutorials

    http://www.ahfb2000.com/webmaster_he...hlight=include
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    luke242's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    2
    Thanks,
    Let me see if this is right. The only way to include a file when you are limited to the client side is to use a .js file with a document.write command? This appears to be a pain, as I can not use an stripped down html page. Perhaps this is way you said "not good." If only I could document.write an html file.

    On the side, http://www.moock.org/webdesign/javascript/client-side-include/ is a useful utility for converting text (or html) into acceptable .js format for the document.write commend.

    ~Luke Campbell

  4. #4
    sonofmidi's Avatar

    Status
    Offline
    Join Date
    Jan 2001
    Location
    NC, USA
    Posts
    75
    You could use an Iframe. If your table has absolute dimensions, you can easily add this to your pages.

    <iframe width="200" height="200" scrolling="auto or no or yes" frameborder="0" src="page_with_content.html"><noframes>Your browser doesn't support Iframes</noframe><iframe>



Tags for this Thread