Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5

Thread: Prompt

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    2
    Member #
    3693
    Hi everyone,

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    
    if (navigator.javaEnabled()) 
    window.location = "java-page.html";
    else 
    window.location = "non-java-page.html";
    
    </script>
    How could I add an alert to this script if you are going to be sent to the non-java-page.

    Thanks,
    Chris

  2.  

  3. #2
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    if (navigator.javaEnabled()) 
    {
    window.location = "java-page.html";
    }
    else 
    {
    alert("Java not found.");
    window.location = "non-java-page.html";
    }
    </script>
    There and Back Again :Ogre:

  4. #3
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    Surely a JS alert wouldn't work if they didn't have JS enabled?

  5. #4
    Senior Member energizze's Avatar
    Join Date
    Oct 2002
    Posts
    260
    Member #
    238
    Java enabled not javascript.

    Java and javascript are 2 completly different languages.

  6. #5
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    I read JS for some reason, lol.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com