window.open

Discussion in 'JavaScript' started by petran, Apr 22, 2008.

  1. #1
    Hello there.

    I have an external .js function wich makes that call

    window.open('htmlImages/image1.html','view','width=400,height=430,resizable=no,scrollbars=no,tollbar=no,menubar=no,top='+magnitude+',left='+latitude+'');

    I works fine and it opens a new window though I am been redirected to the
    root page of my website. I want the window.open to open a new window without changing the current location.

    Thank you.
     
    petran, Apr 22, 2008 IP
  2. vpguy

    vpguy Guest

    Messages:
    275
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It sounds like the problem is in the htmlImages/image1.html file. Check to make sure that the file exists and does not redirect the user.
     
    vpguy, Apr 22, 2008 IP
  3. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hi,

    I think you need wright the full address like,

    window.open("http://www.yoursite.com/nnn/nnn.html")
     
    Sabbir, Apr 22, 2008 IP
  4. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #4
    Actually, that is a code to open a popup window, not to changing your current location.

    If your current main window location is changed, its not from that line. There must be other lines which redirect your location.

     
    xrvel, Apr 23, 2008 IP
  5. RaulGonzales

    RaulGonzales Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes Thank x:D
     
    RaulGonzales, Apr 23, 2008 IP