Tutorial :How can I get opener's element with jQuery?



Question:

Just like in JavaScript:

opener.document.getElementByName   

jQuery: ??

Is there any way to get opener's element with jQuery?


Solution:1

If I understand you correctly, then you simply pass the opener as the second parameter in the jQuery function, like so:

var abc = $("[name=abc]", window.opener.document);  

You may also reference the jQuery object directly from the opener, like so:

var abc = window.opener.jQuery("[name=abc]");  


Solution:2

window.opener.$("[name=elementName]")  

Replace elementName with the name of your element.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »