Avoiding grey box


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Avoiding grey box

  1. #1
    Join Date
    Feb 2003
    Posts
    2

    Question Avoiding grey box

    Hi,

    Is there a way (perhaps using javascript) to have an image of the same size appear in lieu of the java applet, whenever the user doesn't have java enabled to avoid the ugly gray rectangle?

    Thanks!
    Palosanto

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    err....don't think so. It's probably best to have a 'Java-enabled' version of your website and a 'non-Java' version. That's the simplest solution.
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Feb 2003
    Posts
    2
    Thanks Arcangel.
    Actually I figured it out since I posted the message.

    With Javascript:
    <SCRIPT language="JavaScript">
    <!--
    if (navigator.javaEnabled()) {
    document.open();
    document.write('<APPLET archive="Appletname.jar" code="blablah.class" width="377" height="56" alt="3D Graphics" name="3D Graphics">'); ....

    each line within a document.write expression ....
    . . .
    . . .
    document.close();
    }
    else {
    document.open();
    document.write('');
    document.close();
    }
    //-->
    </SCRIPT>


    Regards

  4. #4
    Join Date
    Mar 2003
    Posts
    834

    Cool

    ahhhh....nice....
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center