Advanced Search

Results 1 to 4 of 4

Thread: iframe alternative

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

    Default iframe alternative

    Hi! I hope you can help me because I've been looking for hours for a good solution to this and with my limited web knowledge I can't seem to find one.

    What I do know: XHTML, Some JavaScript and bits of everything else.

    I'm looking to replace an iframe possibly with a div or object tag but I need it to be able to either load html or provide an easy to understand (by me) loading of data (xml?).

    I also want to be able to scroll the data without a scrollbar from seperate images.

    If you need more explanation please ask me because I'm lost and I've tried many "almosts".

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,136
    Thanks
    22
    Thanked 116 Times in 111 Posts
    Blog Entries
    26

    Default

    Quote Originally Posted by veganeatingout View Post
    I'm looking to replace an iframe possibly with a div or object tag
    This, or this, or this?
    ===
    Arie Molendijk.

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,628
    Thanks
    6
    Thanked 108 Times in 108 Posts

    Default

    If the data you are loading is from your domain itself then you can even try to use AJAX for the loading purpose when you need that content.

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,136
    Thanks
    22
    Thanked 116 Times in 111 Posts
    Blog Entries
    26

    Default

    Quote Originally Posted by codeexploiter View Post
    If the data you are loading is from your domain itself then you can even try to use AJAX for the loading purpose when you need that content.
    And a (very basic) example would be:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
    
    <title>Htranscluder</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <script type="text/javascript">
    document.includeWrite = function (url) {
    if ('undefined' == typeof(url)) return false;
    if (window.XMLHttpRequest)reqWrite = new XMLHttpRequest()
    else if (window.ActiveXObject){
    try {
    reqWrite = new ActiveXObject("Msxml2.XMLHTTP")
    }
    catch (e){
    try{
    reqWrite = new ActiveXObject("Microsoft.XMLHTTP")
    }
    catch (e){}
    }
    }
    reqWrite.open("GET",url,false); reqWrite.send(null); document.write(reqWrite.responseText);
    }
    </script>
    
    </head>
    
    <body>
    
    text
    <script type="text/javascript">
    document.includeWrite('includeme.html')
    </script>
    <p>text</p>
    
    </body>
    
    </html>
    which would include includeme.html.
    ===
    Arie.

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
  •