need to close already opened window pop up (using window.open) before opening other pop up.

Posted by Sharmagoldi781 under JavaScript on 3/4/2015 | Points: 10 | Views : 583 | Status : [Member] | Replies : 1
in a page ..there are 20 fields..i am showing definition of each attribute in a window pop up using window.open() method by clicking on the image using javascript.suppose one pop up is opened and then I clicked on some other's attribute image to see definition. so what it is doing just minimizing the first pop up not closing and then opening second pop up.similarly for any number of pop ups.

i need to close already opened window pop up (using window.open) before opening other pop up.




Responses

Posted by: Jitendrasoft09 on: 3/6/2015 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,

First check if current form is opened or not then you pass accordingly into window.open. The below code just code snippet for your reference, look into below link to go ahead to meet your requirement.

function closeMe()

{
window.opener = self;
window.close();
}
</script


http://stackoverflow.com/questions/23306882/javascript-close-current-window

Jitendra Kumar
If my post helps you, plz mark as an answer.

Sharmagoldi781, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response