SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Mar 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to display an "external" HTML document within my own HTML document?

    Hi,

    I'm a newbie, so forgive me if I'm asking a basic question or one that has been asked before.

    I am trying to figure out how I can display an externally generated HTML document within a scrollable "window" on one of my own HTML documents. I do not want to use frames, if possible, and while I use IE5 I want an "all browsers" solution.

    Specifically, I'd like to display one of eBay's HTML pages that displays the auctions I am running within a "window" on my website.

    I've researched a little and it seems like the solution may be with layers (?), but I can't figure out how to set the source to an external document (http:/www.etc...). I've also dabbled with SSI, but again with no luck since the document is externally generated...

    Ideally, the effect I'm after is a "window within a window" or a "page within a page". By this, I mean there would be scroll bars to move up/down and left/right on the embedded window.

    THANK YOU!!!!

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well -- for what you want I can only think of one solution: IFRAMES. However (::drumrolls::) it only works in IE 5+ and I think (?) NS 6 and Mozilla. But, NS4.7 isn't exactly the dominant powerhouse it used to be -- so you're probably safe if NS6 and Mozilla support IFRAMES is well. If you decide to continue on this course, just let us know and we'll help you with the coding.
    Until then ... happy coding!
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Member
    Join Date
    Mar 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IFRAMES

    Aes,

    Thanks for your quick response and willingness to help! I've never heard of IFRAMES. I agree that the "major" browsers you've listed will be sufficient, so any help on how to code or can you point me to a site that describes how to use IFRAMES or has examples?

    Thanks Again!!!

  4. #4
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case you don't want to use IFRAMES there seems to be another solution at www.codephobia.com/tutorials/view.php3?idnum=1
    I have not tried this myself yet so I have no idea how it works, but maybe it can help you in some way.

  5. #5
    SitePoint Member
    Join Date
    Mar 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Marina,

    Thanks for the tip! I'll give it a shot.

  6. #6
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That DHTML solution is very interesting and looks promising. However, both have their compatibility problems. DHTML is client side, and isn't supported completely. Of course neither are IFRAMES. I'll post an example IFRAME here if you decide to go with that, but both solutions look like they would produce similar results.
    Code:
    <p align="center" valign="top">
    <iframe src="framecontents.html" title="Name of page in frames" width="500" height="200">
    <!-- if IFRAME isn't supported, put message here -->
    <h1>Your browser does not support IFRAMES</h1>
    </iframe>
    </p>
    Try them both out, and see what you prefer. Also, thanks Marina for that link -- I'll bookmark it. Perhaps I'll make a good reference point someday. Until then jlind, happy coding!
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The dHTML version would give you the windowed effect but it would not allow you to pull in external content (AFAIK). The content for the scroller would have to programmed into the script (or pulled in from a database).

    Frames (or iFRAME) are going to be your only way of pulling in external content into your website.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::points at creole's post::
    That too! I think overall you'd be better off going with the IFRAME. Editing a DHTML script often isn't exactly what I call fun. =)
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  9. #9
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do it with Javascript to. Just everything in the file will have to be javascript. But you can print out html with document.write and it'll work in all js browsers.

    Of course if you have access to any server side language it's extremely easy to do it that way.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  10. #10
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't grab a page off of someone elses server and put it into a document.write can you?

    I always thought that you couldn't do that. I think that is what he is wanting.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •