Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to access parent window javascript variable inside child window(pop-up)? [closed]

Tags:

javascript

I have html page which has global javascript variable with name custName="scott". I open the pop-up window with window.open.

Now if I access the custName inside pop-up window with window.opener.custName, I get values as undefined. How do I access parent window javascript variable inside child window(pop-up)?

like image 789
emilly Avatar asked Feb 18 '13 17:02

emilly


1 Answers

window.opener.custName works. It was typo mistake.

like image 194
emilly Avatar answered Oct 17 '22 05:10

emilly