Solved

ASP.NET 'contentWindow.document is null' error

Posted on 2004-03-30
5
300 Views
Last Modified: 2008-03-17
Does anyone know more about this error and maybe how to fix it? It happens when I call button click from javascript: Form1.button1.click();

Thanks
0
Comment
Question by:gromul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10720526
Is the current window open?

do the check
if (contentWindow.document)
{

}
0
 

Author Comment

by:gromul
ID: 10720570
I tried that but get an error message that the contentWindow is undefined. How do I define it?
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 500 total points
ID: 10720727
simply go one level up and do the check

if (contentWindow)
{

}

0
 

Author Comment

by:gromul
ID: 10721964
It says that contentWindow is undefined also. What I don't understand is: what's the relationship between calling the button click and contentWindow?
0
 

Author Comment

by:gromul
ID: 10731028
Thanks venkateshwarr.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Obtain data from database .mdb 4 35
How to post data to an API using ASP Classic 3 48
SQL to JSON 14 61
Boolean 13 45
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question