473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ActiveXObject

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

Jul 23 '05 #1
2 3477
Peter Kirk wrote:
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?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
Peter Kirk wrote:
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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nomad | last post by:
I'm trying to load an XML document into the DOM using the ActiveXObject I've succeeded in doing this on one machine. Which shouldn't becaus I've checked for the ActiveXObject and it doesn't...
1
by: Brian McPheeters | last post by:
Is there anyway to get ActiveXObject('Msxml2.XMLHTTP') to work with Mac IE 5.1 on the client side? I need to get a text response from the server with javascript so I can parse it. This seems to...
2
by: Marcin Zmyslowski | last post by:
Hello all! I have installed MSDE on my local computer - Windows 2000 Professional. I have created a function which runs me a link whose path is placed in the input field. This function looks...
0
by: ndronen | last post by:
Hi: I have a DLL compiled from C# that I have to be able to use within an HTML document. This is relatively easy to do following the suggestions on this page: ...
1
by: JTree | last post by:
Hi all, My System is windows and ie version is 7. My code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1
by: jfking | last post by:
Hi Everyone, I have a need to load a document in a browser (in an iFrame) and then get control of that instance of the ActiveXObject. I need to do things like formatting and whatnot. I have...
11
by: nitinsingh1 | last post by:
Hi, I am using ActiveXobject as var xp = new ActiveXObject("WPrint.PrintCtl"); in my JSP application. I have heard that using ActiveXobject may be dangerous for my application as i am using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.