Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 25, 2010 02:33 PM by bhanu_pratap
Jul 30, 2007 03:52 PM|LINK
Thanks in advance.
Jul 30, 2007 04:34 PM|LINK
I understand that ‘returnValue’ is only available when creating a window using ‘showModalDialog’? I don't think showModalDialog is supported by FF, in which case you’ll need to adopt a different approach.
I use the method you describe as a ‘workaround’, which is the standard DOM method, I believe.
Jul 30, 2007 08:13 PM|LINK
I have a scenario like this: a main browser window has a button named "Fill". When that button is hit, a popup window page is opened with js script like window.open(...) and a user could pick a value from many ones on that popup window.
The popup window also has a button named "OK" so the user after picking any value, he can hit that button and the button's click handler should return that value back to a textbox on the opening browser window. That is all I want. I know window.returnValue
is just works for IE. However, I prefer the same thing that would work for FireFox. Is that possible for FF?
Jul 30, 2007 08:50 PM|LINK
'returnValue' is only supported in IE4+. The way to do it is as follows:
window.opener.document.getElementById("TextBox1").value = document.getElementById("DropDownList1").value;
If you’re doing a lot of work with the child window, you can shorten the statement slightly as follows:
var parentDoc = window.opener.document;
parentDoc.getElementById("TextBox1").value = document.getElementById("DropDownList1").value;
These examples assume your user is selecting a value from a DropDownList, but the principle is the same however the selection is made.
Aug 11, 2008 04:12 PM|LINK
Sorry to disturb the thread ..I have a similar situation to the one described above of your situation ..I am posting this with a hope you could guide me to get a solution or atleast post your code so that i can try myself .my question is on the following
Aug 11, 2008 04:42 PM|LINK
Since there is no window.returnValue variable in Firefox, your ONLY recourse is to do something like:
window.opener.document.getElementById('someTargetObjectInOpener').value = 'value-to-return';
If it ain't there, you can't use it (or create it).
Jun 25, 2010 02:33 PM|LINK
window.ReturnValue is working fine in FireFox(I am using 3.6.3) but its not working in Chrome .
If any one have any solutions then plese reply .this is kind of urgent..