Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 30th, 2004, 01:43 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default 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
__________________
Ahmed Ali
Senior Software Developer
  #2 (permalink)  
Old June 1st, 2004, 12:27 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

can u show the code?

  #3 (permalink)  
Old June 1st, 2004, 03:52 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

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
  #4 (permalink)  
Old June 1st, 2004, 04:39 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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

Snib

<><
  #5 (permalink)  
Old July 11th, 2004, 04:35 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

both use ie as browser

Ahmed Ali
Software Developer
  #6 (permalink)  
Old January 5th, 2007, 08:05 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Problem accessing the window.opener.opener maryuob Javascript 3 January 18th, 2006 05:25 AM
Working with Forms and Popup window in Javascritp danieljava JSP Basics 0 November 20th, 2005 09:57 PM
window.onunload is not working sirsyme Classic ASP Basics 1 August 19th, 2005 04:02 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM





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