Detecting if .class is present

Discussion in 'HTML' started by Thomas Magma, Dec 20, 2003.

  1. Thomas Magma

    Thomas Magma Guest

    Hello,

    I have a case where an applet .class file may or may not be present. In the
    case when it is not present I get a big gray box where the applet is suppose
    to be. This is understandable, but undesirable when someone is viewing or
    printing the page. Is there a way to test first if the .class file is
    present before hand in order to avoid the big gray box.

    Thanks.
     
    Thomas Magma, Dec 20, 2003
    #1
    1. Advertising

  2. Thomas Magma

    Nick Howes Guest

    "Thomas Magma" <> wrote in message
    news:C7NEb.753972$6C4.419170@pd7tw1no...
    > Hello,
    >
    > I have a case where an applet .class file may or may not be present. In

    the
    > case when it is not present I get a big gray box where the applet is

    suppose
    > to be. This is understandable, but undesirable when someone is viewing or
    > printing the page. Is there a way to test first if the .class file is
    > present before hand in order to avoid the big gray box.


    If you have server scripting such as PHP you can. Probably also with
    javascript but then it'd be very much dependant on whether your user had
    javascript (and enabled).


    http://uk2.php.net/function.file-exists

    example given

    <?php
    $filename = 'Yourapplet.class';

    if (file_exists($filename)) {
    print "The Applet Code";
    } else {
    print "Something else friendly";
    }
    ?>

    --
    Nick H
     
    Nick Howes, Dec 20, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mohammed  A.khader

    Assigning present state to output.

    Mohammed A.khader, Sep 6, 2004, in forum: VHDL
    Replies:
    1
    Views:
    550
    Egbert Molenkamp
    Sep 6, 2004
  2. Helixpoint
    Replies:
    8
    Views:
    561
    Marina
    Jun 26, 2003
  3. Grant Merwitz

    Re: Present class in design mode

    Grant Merwitz, Aug 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    463
    Grant Merwitz
    Aug 22, 2005
  4. E11
    Replies:
    1
    Views:
    4,895
    Thomas Weidenfeller
    Oct 12, 2005
  5. Ralf Wahner
    Replies:
    5
    Views:
    647
    Bob Foster
    Dec 24, 2003
Loading...

Share This Page