I have a website build in php, in some page i show a iframe with another website link, which displays it's login screen.
Both Websites are in different domain.
Like main website : http://www.abcd.com Iframe href : http://www.xyz.com
Now my users see a page in abcd.com where there is an iframe like
<iframe src="http://www.xyz.com/" style="width:688px; height:384px;"></iframe>
Which displays the login screen of the xyz.com
Now what i want is, if users login to xyz.com another new tab should open with the homepage, after login of xyz.com and abcd.com tab should get close.
Is it possible to do with javascript or jquery, which works for all the browser including IE 7,8,9 ??
Thanks
By adding target="_blank" to the anchor, it will open it in a new tab. By adding target="_parent" to the anchor, it will open it up in the same window like a normal link.
You can do it with jquery and window. open method. JS : var iframe = $("#iframe"); var newWindow = window.
If you want to open a window within an iframe :<! DOCTYPE html> <html> <head> <script> function openWin() { myWindow=window. open(bing.com,'','width=200,height=100,resizable=yes,too…); myWindow. document.
You can embed an iframe in a page that is inside another iframe on another web page. When you set the target attribute to _parent, the link will open in the web page that is holding the iframe. In most situations with iframes, this target will open links in the same way that the _parent target does.
Open up a new tab
link
<a href="foo.html" target="_blank">linky</a>
pop up
window.open("foo.html", "_blank");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With