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. JavaScript
  4. Window.open Help

Window.open Help

Scheduled Pinned Locked Moved JavaScript
helpquestion
2 Posts 2 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.
  • S Offline
    S Offline
    salmonraju
    wrote on last edited by
    #1

    Hi, I have an application that uses frames. I am calling a method in parent frame as below.(below method is in child frame) function my MyChild() { var pth = window.location.href; //http://localhost/Main/SUB/Child.aspx[^] parent.frames["MainFrame"].MainMethod(); } below is my function in parent Frame, and I am trying to open a new window but that is opening new page in child location I am using below code , is ter any way so that I can track the URL it is trying to open. function MainMethod() { var path=window.location.href; //below is the value //http://localhost/Main/Parent.aspx[^] window.open("Newpage.aspx"); //it is opening in http://localhost/Main/SUB/NewPage.aspx[^] But I am expecting it will open in http://localhost/Main/NewPage.aspx[^] } Please suggest how Can i get the URl path it is trying to open, since window.location.href is giving differnt value. Thanks,

    T 1 Reply Last reply
    0
    • S salmonraju

      Hi, I have an application that uses frames. I am calling a method in parent frame as below.(below method is in child frame) function my MyChild() { var pth = window.location.href; //http://localhost/Main/SUB/Child.aspx[^] parent.frames["MainFrame"].MainMethod(); } below is my function in parent Frame, and I am trying to open a new window but that is opening new page in child location I am using below code , is ter any way so that I can track the URL it is trying to open. function MainMethod() { var path=window.location.href; //below is the value //http://localhost/Main/Parent.aspx[^] window.open("Newpage.aspx"); //it is opening in http://localhost/Main/SUB/NewPage.aspx[^] But I am expecting it will open in http://localhost/Main/NewPage.aspx[^] } Please suggest how Can i get the URl path it is trying to open, since window.location.href is giving differnt value. Thanks,

      T Offline
      T Offline
      twseitex
      wrote on last edited by
      #2

      Helo, why you need var pth and var path ? This vars are not in use ! Cu.

      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