Solved

ASP.NET 'contentWindow.document is null' error

Posted on 2004-03-30
5
301 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 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