Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change url of already opened popup

Tags:

Is it possible to change the url of the popup.

Assume I open a popup:

function pop1(){
    window.open('http://google.com','wind1');   
}

Can the url of the popup window 'wind1' be changed to say 'http://msn.com'. Something with location.href or any other solution.

like image 667
Sushant Avatar asked May 27 '12 13:05

Sushant


People also ask

How do you open a pop up URL?

just using window. open(with out any function) in html solved my problem. When i type page1. html in browser address,it opens google page as a popup.

How do I hide the URL in a Windows open popup?

open("myPopupWindow. html", "_blank", "height=400, width=550, status=yes, toolbar=no, menubar=no, location=no, addressbar=no, top=200, left=300");

How do I open a pop up window in HTML?

The syntax to open a popup is: window. open(url, name, params) : url. An URL to load into the new window.


2 Answers

var w1 = window.open('http://www.canop.org','wind1');

w1.location.href='http://www.google.com';
like image 50
Denys Séguret Avatar answered Oct 25 '22 01:10

Denys Séguret


in the new popup window use this :

$(document).ready(function(){ window.parent.location="http://www.google.com" })

like image 33
Sina Fathieh Avatar answered Oct 25 '22 00:10

Sina Fathieh