Link to home
Start Free TrialLog in
Avatar of wilcor14
wilcor14Flag for United States of America

asked on

Close window if Javascript Function doesn't exist.

I am opening up a pop up from a page and then from the popup I am calling a javascript function from the opening page. Is there a way to check to see if the function exist and if not, to close the popup without displaying any errors?

I am calling the the funtion from my code behind in the popup window as such:
  RegisterStartupScript("GroupManagement", "<script language='javascript'>window.opener.GroupInfoDDL(); window.focus()</script>")

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of stanscott2
stanscott2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wilcor14

ASKER

Perfect. Thanks very much. Do you think this will be cross browser compatible? Thanks.
Avatar of stanscott2
stanscott2

Yes.  I don't think there will be a problem with it, because it doesn't use anything browser specific that I know of.