469,271 Members | 1,020 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Get the value of a variable through window.opener not work in IE (OK for FF, opera)

1
Hi,

In my main window, i have a link that opens a popup: <a.....onclick="reftype='text1';..."/>.
In the popup, i have a button written in Javascript.I would like to get through this button, the value of the reftype variable of the main window. So, in the JS code, i extract the value of this variable with the following code:
window.opener.reftype
For Firefox and Opera, if i do an alert(window.opener.reftype), i obtain text1 that is correct. With IE, i obtain undefined.
Do you have any solutions to solve this problem with IE?

Thanks
Sylvain
Apr 27 '06 #1
2 3061
Try using window.opener.document.getElementById("abcd").valu e

where abcd is the name of element of the parent window
May 17 '07 #2
acoder
16,027 Expert Mod 8TB
Have you defined reftype to be a global variable?

If you're still having problems, consider setting the value of a hidden element and accessing that instead.
May 17 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by ctrl+alt+delete | last post: by
reply views Thread by Peter Morris [Droopy eyes software] | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.