Why did I get this error?

I have one person that this error happened on. I don’t know what browser but I think it must be an older version.

It has worked 100’s of times without throwing this error. Is there an argument I can eliminate that would help make it more compatable?

JavaScript Error:
Error: Could not execute returned javascript: Invalid argument.
Source: window.open(‘https://aspe.org/xo/Examination/examination.cgi?personid=43E410ABCA3140BB8’, ‘ASPE Webinar’, ‘location=no,toolbar=no,scrollbars=no,resizable=yes,top=100,left=300,width=833,height=736’);
Xojo.controls[‘SxMVUDxX’].setPeriod(300000);

Thanks

Rich

Window.open can throw an error if the person has a pop up blocker installed.

So I should wrap this in a try, and except block?

I didn’t think it would throw an exception.

This just proves people don’t read instructions, I explain they need to disable pop up blockers. I even have a button that brings up instructions on how to disable.

Thanks

Well, you need to wrap it in a Javascript TryCatch… so it’d look like this:

try { window.open('https://aspe.org/xo/Examination/examination.cgi?personid=43E410ABCA3140BB8', 'ASPE Webinar', 'location=no,toolbar=no,scrollbars=no,resizable=yes,top=100,left=300,width=833,height=736'); } catch(ex) { }

To be honest, even if a website says that I need to disable my popup blocker, I don’t either. They can be used for such nefarious reasons that it’s just not worth the risk.