How to redirect in javascript ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to redirect in javascript ?

  1. #1
    Join Date
    Sep 2005
    Posts
    9

    How to redirect in javascript ?

    Hi all,

    I am brandnew with javascript.... but: learning !

    I have the following code:

    var m_D = confirm('blablabla');
    if (m_D==true) {
    HERE I WANT TO GO TO ANOTHER PAGE
    }

    What is the code to go to another page?
    I found out that it is not : response.redirect and not location.href.

    Help is appreciated(), Ger.

  2. #2
    Join Date
    Sep 2005
    Posts
    9
    Hi all,

    I found the answer:

    location.href = "http://www.domain.com";
    or
    location.href = "page.html"; // if same domain and directory

    greetings, Ger.

Similar Threads

  1. Replies: 5
    Last Post: 05-06-2006, 10:22 PM
  2. Redirect in javascript
    By Mehdi Chaouachi in forum ASP.NET
    Replies: 2
    Last Post: 12-12-2002, 09:48 AM
  3. redirect in javascript
    By Mehdi Chaouachi in forum Web
    Replies: 1
    Last Post: 12-11-2002, 01:11 PM
  4. Redirect in javascript
    By Mehdi Chaouachi in forum ASP.NET
    Replies: 2
    Last Post: 12-10-2002, 10:57 AM
  5. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 02:42 AM

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