Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: The Object Tag...

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

    Exclamation The Object Tag...

    Hello again ,

    I do not completely understand how the object tag in HTML works, for example here is a script that uses the object tag to bring up a color box -

    <html>
    <body>
    <object id="myDhelper"
    classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b">
    </object>
    <button onclick="myDhelper.chooseColorDlg();">Show color dialog</button>
    </body>
    </html>

    Some how without any code it brings up an color thing that would take hundreds of lines of code to do, how does this work ???...

    I think I once read that the classid has unique ids that have certain functions added to them (even if this is true please give ALL the details of that code abpve and possibly extra if there is anything extra)...

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The classid attribute is a URI (if the "magic GUIDs" IE uses can be called URIs) to a piece of code elsewhere. In this case, I'm guessing that GUID refers to an ActiveX control of some kind.

    Note that this (ab)use of the <object> tag will work only in IE, and that accessing elements by using their IDs as identifiers in the global namespace is very deprecated, and should never be used.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there any more information available anywhere?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Since it's IE-only (and Microsoft have never been lovers of documentation), documentation appears to be scarce.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So are you saying that I might as well forget anythig related to the object tag?

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yes, he is . Remember, it's IE only, and that's not user-friendly
    - Mike

  7. #7
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well oh well, away with object...

  8. #8
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    no, the object tag is supported in all browsers, otherwise you couldn't use java in FF...
    This preticular use is IE only.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  9. #9
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yes, the use of ActiveX. (again, back to this topic)
    - Mike

  10. #10
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm just throwing away object as I do not have any knowlegde of its features/purpose...

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
  •