DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  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:-)

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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links