ActiveXObject

P

Peter Kirk

Hi there,

I am having trouble with ActiveXObject. I have a function which includes
this snippet:

alert('INIT 1');
orgdoc = new ActiveXObject('Microsoft.XMLDOM');
alert('INIT 2');

I see the "INIT 1" alert box, but "INIT 2" is never displayed. It is as if
the ActiveXObject fails and the function exits without executing anything
else. Is that possible? And what could possible problems be?

Thanks,
Peter
 
R

Randy Webb

Peter said:
Hi there,

I am having trouble with ActiveXObject. I have a function which includes
this snippet:

alert('INIT 1');
orgdoc = new ActiveXObject('Microsoft.XMLDOM');
alert('INIT 2');

I see the "INIT 1" alert box, but "INIT 2" is never displayed. It is as if
the ActiveXObject fails and the function exits without executing anything
else. Is that possible? And what could possible problems be?

With IE6, and this script I get both alerts:

function testIt(){
alert('INIT 1');
orgdoc = new ActiveXObject('Microsoft.XMLDOM');
alert('INIT 2');
}
window.onload = testIt;

What browser are you testing it in?
 
G

Grant Wagner

Peter said:
Hi there,

I am having trouble with ActiveXObject. I have a function which includes
this snippet:

alert('INIT 1');
orgdoc = new ActiveXObject('Microsoft.XMLDOM');
alert('INIT 2');

I see the "INIT 1" alert box, but "INIT 2" is never displayed. It is as if
the ActiveXObject fails and the function exits without executing anything
else. Is that possible? And what could possible problems be?

Thanks,
Peter

Look in the lower left corner of Internet Explorer for a yellow !. If it is
there, double-click it, you'll most likely see that your code is causing an
error. Security settings might be preventing ActiveX objects from being run,
in which case, your code would be generating an "Automation server can't
create object" error.


--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top