SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist Alluvian's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to detect if a java applet has loaded properly

    I have two versions of the same page right now, the first one uses the java applet:
    http://www.thebrasse.com/lotro/index2.php

    And the second one which I am currently using is not using the java applet:
    http://www.thebrasse.com/lotro/

    I can't seem to figure out why the applet loads properly sometimes and does not load properly other times. This will happen on the same computer, just hours apart.

    I am looking to make a hybred page which has both search boxes on it, but the java applet one is hidden with .css until it loads properly, and then at that time javascript will reveal the applet and hide the less functional combobox.

    This will allow non-java/javascript users to see the normal html combobox but allow the additional functionality for those who can use it properly.


    Does anybody have any suggestions on how to detect if the applet has loaded? Should I look at the .isloaded property of the applet? Do I need a time delay after the javascript onload event handler to give the applet time to load, or will a failed loading of the applet keep the onload event from ever occurring?

    I am very new to both javascript and java, and my 3 week hiatus from the site only made me more rusty.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,441
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    applet

    AFAIK isloaded is defined differently (start vs finish) by different browsers.
    You may have better luck using
    HTML Code:
    document.applets[0].isActive
    Although I think this needs an IE - non IE work around (of course).


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
  •