Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Thanked 1 Time in 1 Post

    java redirecting

    I completely have no knowledge about java. so please if I ask this question. this means you probably say what a dumb *** question

    ok now I start
    can anyone tell me how to redirect to another location with condition?
    window.location = 'http://www.yourdomain.com'
    I got this script somewhere , and yup I know what it means.

    but firstly, before redirecting , I wanna make sure the visitor has javascript enabled before perform any further web browsing. you know what I am saying?

    something like this
    if no javascript then come up with another page saying " please enable javascript " or message to enable.

    else redirect to another location

    this might be piece of cake for you guys.
    I have no knowledge about java. I am learning PHP . so ... pardon me for asking dumb question .

  2. #2
    Regular Coder
    Join Date
    Oct 2006
    United Kingdom
    Thanked 30 Times in 29 Posts
    I think you are asking about how to perform a redirect in JavaScript and not in Java.

    Java and JavaScript are completely different programming languages...and the two are used for different purposes. Please do a google search on the difference between the two...as I could write a whole book about that.

    As for alerting the user that JavaScript must be enabled if it is disabled. I think the best thing to do is to use the "noscript" tag...which will be displayed if javascript has been disabled on user's browser.

    In order to use this website, you must have JavaScript enabled. <br/>
    if you are using Internet Explorer...this is how ...etc
    Hope that helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts