473,378 Members | 1,438 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,378 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 3474
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.