473,387 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 3130
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

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

Similar topics

1
by: MrFez | last post by:
I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the value of a textbox in the main (parent) window by...
1
by: Tony Farrell | last post by:
Hi Everyone - I have a data entry form that allows the user to click a button and have that button popup a list of available values - the code on the popup window uses the name of the form to...
3
by: ctrl+alt+delete | last post by:
I have a normal window cotaining a form (named form1). The form has a text input called imageURL. There is a button that, when clicked, opens a new window that contains three frames (left, right...
0
by: Peter Morris [Droopy eyes software] | last post by:
Hi all I have a form which pops open from my page. This form asks the user to enter some values which are then validated on the server. The problem is that the window.opener seems to be lost...
1
by: MrFez | last post by:
I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the value of a textbox in the main (parent) window by...
7
by: MrFez | last post by:
Through some investigation it appears that selecting "Every visit to the page" for the IE caching setting "Check for new version of stored pages" causes the window.opener property of child windows...
4
by: Phil Powell | last post by:
I thought this would work but it seems to not work neither in Netscape nor in IE: <script type="text/javascript"> <!-- // OBTAINED FROM http://www.javascripter.net/faq/settinga.htm //...
5
by: asadhkhan | last post by:
I have the following code which works correctly in IE 6, but in IE 7, Fire Fox 2.0 and Netscape 8 it does not work. I have a main page where a button calls this pop-up and uploads a file once you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.