Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Prevent or hide javascript error

Hi,

How can I prevent error messages showing on the statusbar of the browser?

I have an object (newwin = window.open(...)) that is only created by clicking a button but there is always a check to see is newwin is already open.

So when I enter the page, newwin is not existing and javascript check shows me the error in the statusbar saying: 'newwin' is undefined.

How can I hide or even prevent that error?

Thanks in advance.
Filips
0
Filips
Asked:
Filips
  • 2
1 Solution
 
ahosangFinance Systems DeveloperCommented:
if (!window.newwin||(window.newwin&&newwin.closed)) {
  newwin=window.open(...)
}
0
 
FilipsAuthor Commented:
Short but good.

Thanks a lot ahosang.
Filips
0
 
ahosangFinance Systems DeveloperCommented:
glad to help :-)
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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