Results 1 to 8 of 8

Thread: load html page in div

  1. #1
    Join Date
    May 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default load html page in div

    Hi All,
    First question in this forum.

    I am using AJAX Div tag script from this website.

    Works great.

    My question :
    I can load external page in the Div tag like Google.com and sure there are links on goggle .com. So when I click those links it open up in new window or in same window replacing my website.

    Is it possible that if I click any link with in that div tag then it open up in the same div tag?

    I understand there may be some security thing going on. But I want to make it work with in the same domain without changing the links in the existing html pages. I know this can be done easily with iframes. But I am rebuilding the web site with new flash drop down menu which doesn't work in fire fox when the drop downs overlap on the iframe.
    That is why I trying to use DIV.

    Any suggestion would be appreciated.

    Thanks

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    As far as loading it in the div i have no suggestions as those are not my area of expertise. Try posting is a non-flash forum and you might be able to get some of the better coders here to help you out..

    I would personally go the iframe route...
    Yes I know there is a glitch with overlapping flash elements and iframes but there are tricks around that...

    It's a three step process:
    Position your flash movie and iframe with CSS
    Set the corresponding z-index properties
    Set the "Window mode" of the flash movie

    Just google "z-index + flash" and you'll find a ton of resources
    But for starters, check this out : http://joshuaink2006.johnoxton.co.uk...nt-and-z-index

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You can use Ajax to load an external file into a DIV, though that file would need to be from the same domain as your own. So a link to Google.com won't work.

    With that in mind, see this script: http://www.dynamicdrive.com/dynamici...jaxcontent.htm

  4. #4
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm having some problems using the script from the link referenced above^^. When I test it using FireFox, the content loads normally and everything is fine. When I test it using IE7 nothing happens and I get a JavaScript error below. Am I doing something wrong? I'm pretty new to this stuff so any advice would helpful. Thank You

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    This, perhaps?
    ===
    Arie Molendijk.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Asmith View Post
    I'm having some problems using the script from the link referenced above^^. When I test it using FireFox, the content loads normally and everything is fine. When I test it using IE7 nothing happens and I get a JavaScript error below. Am I doing something wrong? I'm pretty new to this stuff so any advice would helpful. Thank You
    Probably not. To work in IE 7 the script must be live.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your help. I should have known that.

  8. #8
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    I find this interesting:
    Code:
    <head>
    
    <style type="text/css">
    a{font-family:verdana; font-size:12px}
    #google{position:relative; left:50px; height:280px;width:500px; overflow:auto; border:1px dashed red; 
    
    display:none}
    </style>
    
    <script src="http://codinginparadise.org/projects/purple-include/purple-include.js"></script>
    
    </head>
    
    <body>
    
    <a href="#" onclick="document.getElementById('google').style.display='block'; return false">Google</a>
    <div id="google" href="http://www.google.nl#xpath(//html)"></div>
    
    </body>
    but it probably won't serve all your needs.
    ===
    Arie Molendijk.

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
  •