Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Object vs iframe: why this code is working for IE offline and not online?

    Hi all,

    I want to show a webpage inside of my page. I'd be using an iframe but it has to validate w3c XHTML 1.0 Strict and wai. So I go for object instead.

    The code has to work in all modern browsers including Internet Explorer 6, 7, and 8.

    And here are my tries:

    Please have a look to the chunks of code below. Each is a version of code to make object work.

    Using Firefox and Safari:
    OFFLINE:
    #1 works
    #2 woks
    # 3 dont work, shows: "The object can't be rendered"
    #4 works

    ONLINE: the same as when offline.

    Using Internet Explorer:
    OFFLINE (----after accepting the alert to show blocked content----):
    all the versions of code work!

    ONLINE:
    None of the versions work!! It shows something like an empty iframe, a blank with no active scrollbars around.
    And here's the problem, I need a version of the code to work online and in all browsers.

    Please give me a hand here, I have to show this working very soon and I don't have a clue on what is happening.

    Thanks a lot

    Code:
    <!-- #1 -->
    <object codebase="http://www.google.com" type="text/html" data="http://www.google.com"  style="width:526px;height:447px" standby="Information">
       <img src="http://3dshaders.com/shaders/Earth-1tex.jpg" alt="the earth" longdesc="earth.html" />
    </object>
    </div>
    
    <!-- #2 -->
    <object  classid="http://www.google.com"  codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
    	<object  codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
    		alt : <a href="apage.html">more information</a>
    	</object> 
    </object>
    
    <!-- #3 -->
    <object data="http://www.yahoo.es" classid="clsid:235336920-03F9-11CF-8FD0-00AA00686F13"  type="text/html" id="editorWindow" style="width:30em;height:10em;">
    <p>Sorry. The object can't be rendered .</p>
    </object> 
    
    <!-- #4 -->
    <object classid="clsid:235336920-03F9-11CF-8FD0-00AA00686F13"   codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
    	<object  codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
    		alt : <a href="apage.html">more information</a>
    	</object> 
    </object>

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    We need to see all your code or better still a link.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for answering effpeetee
    What I'm posting is different versions of the same thing in order to make it work, and that's all the code (minus the body and html tags)
    Please re-read my post, if you need any further info please let me know.
    Thanks again

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by Lleoun View Post
    Hi all,

    I want to show a webpage inside of my page. I'd be using an iframe but it has to validate w3c XHTML 1.0 Strict
    So? Never heard about the iframe to be invalidated by w3c, no matter the DTD. The <object> tag is not yet well supported by all the browsers, as far as I know.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I thought it was supported for all browsers .. I'll go for the iframe then (It's a tag from tons of years ago, don't understand why it's not deprecated..)
    Thanks a lot

  • #6
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by Lleoun View Post
    I thought it was supported for all browsers ..
    It is supported but in different ways, according mainly to the versions.
    Quote Originally Posted by Lleoun View Post
    [ ..iframe..] It's a tag from tons of years ago, don't understand why it's not deprecated..)
    No reason for. Don't confound FRAME with IFRAME. Nor FRAME is deprecated, even if these days almost nobody uses FRAMES.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    The iframe was thrown out as being valid in strict doctypes. The object element is starting to replace it however its buggy in some browsers. IE needs to know what kind of data it is and it can only be used for local file, not external sites or urls.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks all, now it's clear as water!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •