dynamic <object> tag

Microsoft recently released a "fix" that, when installed from windows update, causes ActiveX controls in IE to not be activated by default. There is a script workaround, but it doesn't seem to work for me. I'm doing this in my html page:

<body>
<SCRIPT LANGUAGE="JavaScript" SRC="ActiveXLoader.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
      loadHelp()
</SCRIPT>
<DIV ID="helpLauncherDIV"></DIV>
</body>

[ActiveXLoader.js:]

function loadHelp(){
      str = ""
      str += '<OBJECT ID="helpLauncher" CLASSID="CLSID:20DABCB5-AB70-4E2B-BCA9-17155D5CF583"\n'
      str += 'CODEBASE="Resources/helpLauncher.cab#version=1,0,0,1"\n'
      str += 'WIDTH="1" HEIGHT="1">\n'
      str += '</OBJECT>\n'
 
    alert(str)
    alert(document.getElementById("helpLauncherDIV").innerHTML)
      //document.getElementById("helpLauncherDIV").innerHTML = str
}

...the alert fires and shows the dynamic string. but the call to document.getElementById("helpLauncherDIV").innerHTML fails with "object required". Why isn't it finding my DIV? What else can I try? My div is not inside a <FORM>
LVL 11
SweatCoderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

smaccariCommented:
You have to call your JS function AFTER the div tag:

<DIV ID="helpLauncherDIV"></DIV>
<SCRIPT LANGUAGE="JavaScript">
     loadHelp()
</SCRIPT>

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SweatCoderAuthor Commented:
well....duh! my bad.  :-/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

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.