Open new page in the same window

Discussion in 'Javascript' started by Netx, Jan 16, 2009.

  1. Netx

    Netx Guest

    What syntax should I use to open for example "index.html" in the
    same window? Currently in <td> i have:
    <td
    onClick="document.open('index.html','_self');">
    >

    which displays a blank page after clicking and not "index.html".

    Mark
     
    Netx, Jan 16, 2009
    #1
    1. Advertisements

  2. Netx

    Netx Guest

    Ok, I have just found it:
    document.location.href = "new.html";
     
    Netx, Jan 16, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jazzis
    Replies:
    4
    Views:
    371
    Jazzis
    Sep 26, 2003
  2. Gordon
    Replies:
    3
    Views:
    547
    Steven Burn
    Apr 16, 2004
  3. PC HUA
    Replies:
    2
    Views:
    683
    PC HUA
    May 19, 2004
  4. Replies:
    2
    Views:
    684
  5. Benton
    Replies:
    3
    Views:
    194
    Thomas 'PointedEars' Lahn
    Mar 2, 2006
  6. Replies:
    4
    Views:
    343
  7. Berlin  Brown

    Selection; open popup or open a new window

    Berlin Brown, Jun 26, 2006, in forum: Javascript
    Replies:
    0
    Views:
    225
    Berlin Brown
    Jun 26, 2006
  8. Replies:
    1
    Views:
    413
Loading...