Jump to content

Change then focus in browser tabs


daveWare

Recommended Posts

Hello,I'm trying to run a js that will open a child window, or if the window is already open, change the focus to that window. Here is the script:

//use this one in Shoppingfunction openDes() { 	if (window.opener && !window.opener.closed) {							// if the opener is closed			window.opener.focus();									   // change the focus to the opener: does not work in tabs: domainsecurity issue (?)		} else {			window.open('http://designer.kaneva.com/', 'designer');			    // open designer in a new window			}	}	

the script works perfect if the pages are open in 2 different windows. However if the pages are open in tabs i can't change focus or even close one of the pages. the pages are sitting in 2 sub domains:http://shop.kaneva.com/andhttp://designer.kaneva.com/is there a way to change the focus to the opener when tabs are being used? Thank you,Dave

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...