SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot Valera Selev's Avatar
    Join Date
    Apr 2004
    Location
    Lviv, Ukraine
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding java-applet

    What is the most literate way of placing java applet on the web-page?
    I came across two most common variants - one using the <applet> tag and one more using <object> and <embed> tags. Which of them should I choose?

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Nova Scotia, Canada
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ----
    Cheers, Jamie

  3. #3
    SitePoint Zealot Valera Selev's Avatar
    Join Date
    Apr 2004
    Location
    Lviv, Ukraine
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jamie_g
    Hum are you trying for w3c standards...Does this help:
    And how do different browsers support this feature?
    Last edited by Valera Selev; Jun 21, 2004 at 08:31.

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Nova Scotia, Canada
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your coding your website for say xhtml 1.0 (strict), or 1.1 they havent created the rules yet for emdedding objects the are well supported yet, but this example for Flash may help: http://www.alistapart.com/articles/flashsatay/

    *** This is taken from the alistapart article listed above ***

    The <embed> Element

    The <embed> element was created by Netscape as their method of embedding plug ins and players in web pages. It’s not part of the XHTML specification, and while some browsers other than Netscape support it, it’s not standards-compliant, so it’s out.

    Bye bye, <embed> ... it's been swell.
    The <object> Element

    Without <embed>, we’re left with the <object> element, so it would be prudent to fully understand its capabilities. The great news is that just about every browser in popular use supports <object> in one way or another.

    The <object> element has no required attributes, but many are available for use. Below are the more interesting ones, along with edited highlights from the W3C specification.

    classid (URI) This attribute may be used to specify the location of an object’s implementation via a URI. It may be used together with or as an alternative to the data attribute (see below), depending on the type of object involved.

    codebase (URI) This attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document.

    data (URI) This attribute may be used to specify the location of the object’s data, or more generally, a serialized form of an object which can be used to recreate it.

    type (content-type) This attribute specifies the content type for the data specified by data.

    codetype (content-type) This attribute specifies the content type of data expected when downloading the object specified by classid.

    There are other attributes that allow references to archived versions, cause text to display while loading (we can do this is Flash already), and so on, as well as width, height, id, class and other common attributes. The ones listed above, however, are particularly relevant when it comes to embedding Flash movies.

    Another useful thing I learned is that an <object> tag can contain child elements which can be used as an alternative if the browser doesn’t have the capability to display the object itself. In fact, this is how the undesirable nested <embed> works in Netscape browsers—but more on that later.
    You shouldn't have any issuses say for a java applet (your user would have to have java installed). Some though you will not have control over, like Flash or if your user requiers the Shockwave plugin, it would be up to them to have thoughs.

    Some useful links:http://msdn.microsoft.com/library/de...n/html/bho.asp

    http://tutorials.beginners.co.uk/read/id/314

    Hope this helps.

    -jamie
    ----
    Cheers, Jamie

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Nova Scotia, Canada
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ----
    Cheers, Jamie


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
  •