ActiveX dispatch call does not fire

When the html code below is opened in IE6, the activeX control gets installed, but the dispatch method (launchViewer) is not called. If you open the file a second time, the method is call and all is peachy.

How can I get the method "launchViewer", to fire during the first viewing of the html code, just after the activeX install?

<script language="javascript">
document.write('<OBJECT ID="ImpactX" WIDTH=900 HEIGHT=900 ALIGN=middle HSPACE=0 VSPACE=0 CLASSID="clsid:A716EC5E-7FC9-4B00-8116-7752CC9D9683" CODEBASE="" STANDBY="Loading file uploading component..." TYPE="application/x-oleobject">\n');
	var launchInfo = "Happy days here again";;

Open in new window

Who is Participating?
syysConnect With a Mentor Author Commented:
After playing around with the file I found the solution. I move the call to the dispatch method outside the body and it worked.
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.

All Courses

From novice to tech pro — start learning today.