• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

ASP.NET 'contentWindow.document is null' error

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
gromul
Asked:
gromul
  • 3
  • 2
1 Solution
 
venkateshwarrCommented:
Is the current window open?

do the check
if (contentWindow.document)
{

}
0
 
gromulAuthor Commented:
I tried that but get an error message that the contentWindow is undefined. How do I define it?
0
 
venkateshwarrCommented:
simply go one level up and do the check

if (contentWindow)
{

}

0
 
gromulAuthor Commented:
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
 
gromulAuthor Commented:
Thanks venkateshwarr.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now