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 10 of 10
  1. #1
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Applet & object tag - xhtml1.1

    This is really driving me bananas - can anyone help/advise? I have more or less got my pages validating as xhtml1.1 except for where I have been using java applets. I know the applet tag is deprecated in xhtml1.1 and to use the object tag instead. Unfortunately, the object tag doesn't support the code tag and without a compatable alternative, the applet won't load. Does anyone know how to resolve this? The below code validates as xhtml1.1 - but doesn't work!

    Code:
    <object type="application/x-java-object"
    classid="java:Grid.class" (changed from code="Grid.class")
    name="CCXWORD" 
    width="401" 
    height="633" 
    archive="ccjava.zip" 
    id="CCXWORD">
    <param name="DATAFILE" value="christmascrossword.ccj"/>
    You need Java enabled to view the crossword applet.
    </object>
    I have searched the web for answers, but all I have found are similar questions from other people. It seems that in getting rid of applet in favour of object, W3C have thrown the baby out with the bath water!

    Thank you in advance for any help!
    Diane

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    After some searching, I found this with Google. I don't know anything about Java embedding, but this was reported to be a fix for the problem.

    Code:
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" height="196" width="460" >
    <param name="codebase" value="java" />;
    <param name="code" value="panorama" />;
    <param name="panorama" value="http://www.veiled-chameleon.com/images/hikes/grandeur-peak/grandeur-peak-full-circle.jpg" />;
    <!--[if !IE]> -->;
    <object codebase="java" classid="java:panorama.class" height="196" width="460" >;
    <param name="panorama" value="http://www.veiled-chameleon.com/images/hikes/grandeur-peak/grandeur-peak-full-circle.jpg" />;
    </object>
    HTH, Dan

    EDIT: forgot to give credit for code. here it is.

    http://www.veiled-chameleon.com/webl...es/000004.html
    Last edited by whizard; 02-27-2005 at 03:17 PM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Dan,
    Thank you very much indeed for your help and the link. I can now get the applet to work and validate xhtml1.1 in IE, but I need to tinker with the code some more to get it to work in Netscape. At least I should be on the right track now - thank you again!
    ;0) Diane

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    hey, no problem!

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Hi Diane,

    The gecko browsers want to see the <embed></embed> tags - but they have be depreciated in xhtml... but there are some solutions I think... :\

    See this article for a possible workaround:
    http://ww2.cs.fsu.edu/~steele/XHTML/appletObject.html

    This article deals with the xhtml1.1 standard but may still apply.

    The Flash folks are having the same fit (Flash also needs object and embed for cross browser support) so you may want to do a search or both Java and Flash references - using keywords to that effect.

    Good luck - and please post a solution if you find one - I would be interested I know.

    Daf

  • #6
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you! I will look into it and I will certainly post a solution if I work it out! In the meantime, the code below works in Netscape, Mozilla, Opera and IE and validates xhtml1.1 for Flash buttons, if this is of help to anyone:

    <object type="application/x-shockwave-flash"
    data="button1.swf"
    width="100"
    height="22"
    title="Example of a Flash button design">
    <param name="movie" value="button1.swf"/>
    <param name="quality" value="high"/>
    <param name="base" value="."/>
    <param name="bgcolor" value="#F8FFF8"/>
    You need the Flash plug-in to view this object, which is merely a demo of a Flash navigation button.
    </object>

    ;0) Diane

  • #7
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got it! The code below validates as xhtml1.1 and works in Internet Explorer 6, Netscape 7.02, Mozilla Firefox 1.0 and Opera 7.54.

    <!-- MS IE (Microsoft Internet Explorer) will use outer object -->
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"
    height="633" width="401" >
    <param name="code" value="Grid.class" />
    <param name="DATAFILE" value="christmascrossword.ccj"/>
    <param name="archive" value="ccjava.zip" />
    <param name="name" value="CCXWORD" />
    <!--[if !IE]> Mozilla/Netscape and others will use inner object -->
    <object classid="java:Grid.class"
    archive="ccjava.zip"
    height="633" width="401" >
    <param name="DATAFILE" value="christmascrossword.ccj"/>
    <param name="name" value="CCXWORD" />
    <strong>
    This browser does not have a Java Plug-in.
    <br />
    <a href="http://java.sun.com/products/plugin/downloads/index.html">
    Get the latest Java Plug-in here.
    </a>
    </strong>
    </object>
    <!-- <![endif]-->
    </object>

    Thank you both very much for your help - I could never have resolved this without you both!

  • #8
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    140
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Thank you for posting the resolution! I've copied it into my notes for future reference.

    Daf

  • #9
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You're welcome!

  • #10
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Maybe make this sticky?

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Posting Permissions

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