+ Reply to Thread
Results 1 to 8 of 8
Like Tree2Likes
  • 1 Post By LostHorizon
  • 1 Post By essellar

Thread: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document ...

  1. #1
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Removing frame border when using HTML <OBJECT> tag to embed a child HTML document ...

    Removing frame border when using HTML <OBJECT> tag to embed a child HTML document into an HTML document in Internet Explorer.

    ---

    Hi,

    Does anybody here know how to remove the frame border when using HTML <OBJECT> tag to embed a child HTML document into an HTML document in Internet Explorer so that the 2 pages would be rendered altogether SEAMLESSLY?

    Thanks a lot.


    Problem description:

    When using HTML <OBJECT> tag to embed a child HTML document into an HTML document (instead of using <IFRAME>), Internet Explorer (up to version 8 - don't know about the new version 9) renders the pages with a 3D inset border around the embedded page.

    NOTE: This doesn't happen when using Mozilla Firefox (don't know about Google Chrome though - one of these days, I'm going to install Chrome on my computer and start testing my pages on it too). Personally, I think that this has something to do with the browser's Look and Feel (has anybody ever noticed that there is a 3D inset border around the page in Internet Explorer?).

    ---


    P.S.: Below are the code snippets for the parent and child HTML pages:

    Parent.html:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <HTML>
     
    <BODY style = "background-color: #D3D3D3;">
       <OBJECT style = "width: 500px; height: 300px;"
               type = "text/HTML" data = "Child.html">
       </OBJECT>
    </BODY>
     
    </HTML>
    Child.html:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <HTML>
     
    <BODY>
       <P>(Child HTML document) --> Testing ...</P>
    </BODY>
     
    </HTML>
    dinomirt96 likes this.

  2. #2
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Can't be done in IE8 or below; the object frame will not respond to CSS applied to either the host document or the source document. That's the reason why web developers are still using <embed> for things like SVG graphics instead of <object>, and one of the reasons why <iframe> is still in heavy rotation even when dynamic client-side content changes are not required.

    ---------- Post added at 02:19 AM ---------- Previous post was at 02:10 AM ----------

    Additional: as far as I've been able to determine, the reason you can't do it in IE is because MS uses an OS-native widget to display <object>s. It's the same reason why <select> elements will poke through any overlay <div>s. In this case, IE seems to be inserting itself (or its control variant) as an ActiveX control on the page in response to the object type.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  3. #3
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Thanks "essellar",

    What about Internet Explorer 9? Are we going to have any control over it (be able to specify if we want or don't want the frame border around the embedded page) in Internet Explorer 9, do you (or anybody else) know? I'm using Internet Explorer 8 right now and I can't upgrade my browser to the new version 9 to find out since the requirement for its Operating System is at least Windows Vista or newer (Windows 7).

    By the way, the reason that I switch from <IFRAME> to <OBJECT> is because of it is no longer supported in future HTML versions (specifically, HTML 5).

    Thank you.

    ---

    Food for Thought:

    With <IFRAME> (or even with <FRAME>), you are able to turn on/off the border with the "frameborder" attribute. I don't know why they couldn't implement it with <OBJECT>.

  4. #4
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Um, section 4.8.2 of the current HTML5 spec document describes the <iframe> element and does not indicate deprication. I don't know where you heard that the <iframe> was going away in HTML5.
    karimirt47 likes this.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  5. #5
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Hi "essellar",

    I haven't got a chance to look at the HTML 5's specification yet partly because right now it's NOT OFFICIAL yet (just a proposal), but (correct me if I'm wrong) to my understanding, anything that's NOT COVERED in the HTML 4.01 Strict Document Type Definition ("strict.dtd") is going to be deprecated in future HTML versions (may be not in the next version, which is version 5, but in the versions after that).

    Thank you.

  6. #6
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Quote Originally Posted by LostHorizon View Post
    ... anything that's NOT COVERED in the HTML 4.01 Strict Document Type Definition ("strict.dtd") is going to be deprecated in future HTML versions ...
    That's an unfounded assumption. HTML5 may not be a recommendation yet, but it is a working document, and the <iframe> element is part of that document (whether you're looking at the W3C or WHATWG version) and has been since the inception of the proposed specification. <iframe> has proven its utility in complex web applications like Gmail (which uses the plain HTML "HTML5" doctype) and others from the "heavy hitters" on the mailing list -- it's not going anywhere.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  7. #7
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    You're right "essellar",

    I looked up the HTML version information in W3.org, and according to the site at http://www.w3.org/TR/html4/struct/gl...l#version-info:

    The HTML 4.01 Strict DTD includes all elements and attributes that have not been deprecated or do not appear in frameset documents.
    it doesn't actually say that <IFRAME> is going to be deprecated in future versions (my bad!!!). I guess this would mean that we can look forward to <IFRAME> being around for a long time then (hurray!!!).

  8. #8
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Removing frame border when using HTML <OBJECT> tag to embed a child HTML document

    Hi!

    To all Internet Explorer 9 users,

    I've uploaded the 2 HTML test documents ("Parent.html" and "Child.html") that I wrote in the thread's first post to my hosting account's test directory. If one of you would be so kind, PLEASE test the pages for me, and let me know if there's STILL a frame border around the embedded HTML page (I would test them myself, except that I'm using Internet Explorer 8 right now on Windows XP, and I can't upgrade my browser to the new version 9 since the requirement for its Operating System is at least Windows Vista or newer, Windows 7).

    You can find the test pages at:

    http://losthorizon.x10.mx/Test/Test%20(OBJECT).html

    Thank you very much in advance.


    P.S.: The embedded page/child HTML document ("Child.html") has white background, while the host page/parent HTML document ("Test (OBJECT).html") has gray background.

+ Reply to Thread

Similar Threads

  1. User Submission Video Embed Parse HTML tags
    By sikuneh in forum Programming Help
    Replies: 2
    Last Post: 02-02-2011, 03:22 PM
  2. Removing .html from url
    By painbringer_gr99 in forum Programming Help
    Replies: 2
    Last Post: 08-15-2010, 05:00 PM
  3. Replies: 1
    Last Post: 05-08-2008, 04:40 PM
  4. Replies: 1
    Last Post: 11-09-2007, 05:01 AM
  5. <object type="text/html"> finding value of <param>'s
    By nonsensep in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-17-2007, 11:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers