SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member Ekoni's Avatar
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Can anyone remember...

    ...seeing an article very recently on using the <object> tag to import html into a page, kind of like a Server Side Include?

    It was along the lines of (I think)..

    Code:
    <object src="/template/snippet.html" type="text/html"></object>
    I was sure I saw it on a recent Sitepoint newsletter, but I couldn't find it. Also couldn't find it on a google.

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try data="" instead of src="". It doesn't work in IE6 though.

    An alternative is <iframe>.
    Simon Pieters

  3. #3
    SitePoint Member Ekoni's Avatar
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Simon. I'm sure I saw a cross browser compat version though. Don't want to use dirty iframes

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is this it?

  5. #5
    SitePoint Member Ekoni's Avatar
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup Johnny - that's it! Cheers for finding it.

    zcorpan - it does work with IE6 on local files (eg data="template/example.html"), but not remote files (eg data="http://www.google.com/index.html").


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
  •