Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. opening new page in same window

opening new page in same window

Scheduled Pinned Locked Moved Web Development
javascripthelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    haritadala
    wrote on last edited by
    #1

    Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.

    N B 2 Replies Last reply
    0
    • H haritadala

      Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      mywin = window.open(...) mywin.focus()

      1 Reply Last reply
      0
      • H haritadala

        Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.

        B Offline
        B Offline
        Bjoern Graf
        wrote on last edited by
        #3

        Give the window a name, eg. var myWin = open(pape, 'MyWindow');. Later, when the main document hasn't changed, you can use the window object to open a new page (if(myWin && !myWin.closed) myWin.localtion.href = 'foo.html';); form a different page, using open with the same name (MyWindow) will load the url into the same window.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups