p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   window.opener working .... not working (http://p2p.wrox.com/showthread.php?t=13571)

alyeng2000 May 30th, 2004 01:43 PM

window.opener working .... not working
 
i was running my application and every thing is all right
but when i put it on another server the same as the first
a java script error is appeared is :

window.opener.document is null or not an object

do any have a solution


also i was closing the child window using window.close(); it shows me the confirmation window and i fix it by add more code "window.opener=self;" Sooooo what is the difference




Ahmed Ali
Software Developer

om_prakash June 1st, 2004 12:27 AM

can u show the code?


alyeng2000 June 1st, 2004 03:52 PM

this the parent calling code:

<script language=JavaScript> win1=window.open('EduCatTr ee.aspx?contname=txt&showtype=2' , '', 'status=yes,Height= 300,Width=500,scrollbars=yes,resize=yes, resizable=yes,toolbar=no '); </script>



and this the child returning script
as this script is generated by the asp so i will cut some of the repeated rows
:>>


<div id="d11000" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="cursor:hand;COLOR: #ff3333; FONT-FAMILY: Arial" onclick="javascript:window.opener.document.all.ite m('txt').value='48';" id="a48">
module1</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="cursor:hand;COLOR: #ff3333; FONT-FAMILY: Arial" onclick="javascript:window.opener.document.all.ite m('txt').value='49';" id="a49">
module2</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="cursor:hand;COLOR: #ff3333; FONT-FAMILY: Arial" onclick="javascript:window.opener.document.all.ite m('txt').value='50';" id="a50">
module4</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="cursor:hand;COLOR: #ff3333; FONT-FAMILY: Arial" onclick="javascript:window.opener.document.all.ite m('txt').value='51';" id="a51">
module5</span><br>
</div>

and as i told you this script is working fine on one machine and other not .... i removed the close script to allow me see that there is error



Ahmed Ali
Software Developer

Snib June 1st, 2004 04:39 PM

Are both machines running IE? Only IE supports document.all.

Snib

<><

alyeng2000 July 11th, 2004 04:35 PM

both use ie as browser [V]

Ahmed Ali
Software Developer

2tkwok January 5th, 2007 08:05 AM

I am having a similar issue too. Any one have any idea.

To add some colour to this issue.

I have a Parent page with a Web User Control that consists of a DateField textbox. I wanted to populate a selected calendar date from a Child page's calendar to the DateField textbox.

So this is my code
window.opener.document.all('WebUserControl:DateFie ld_Textbox').value='04-Jan-2007'

This code works fine in 3 machines but not on one particular machine. I suspect that the machine doesn't like the ':' syntax. Anyone have any suggestions?



All times are GMT -4. The time now is 11:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.