this is the code of the page:

<html>
<head>
<script language="javascript">
function OpenOutlookDoc()
{
try
{
var outlookApp = new ActiveXObject("Outlook.Application");
var nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add('IPM.Note.FormA');
mailItem.Subject="a subject test";
mailItem.To = "[EMAIL PROTECTED]";
mailItem.HTMLBody = "<b>bold</b>";
mailItem.display (0);
}
catch(e)
{
alert(e);
// act on any error that you get
}
}
</script>
</head>
<body>
<input type="button" value="click" onclick="OpenOutlookDoc()"/>
</body>
</html>


now, if u have outlook instaled, it should work. if u run the file 
locally(right click open with IE) it should work. leave it unedited and move it 
in a tomcat project and run it using localhost:8080/projectname/... and it will 
alert you the exception. You might be right, it might not be a tomcat related 
issue, but so far, I am using same browser, same code, and under tomcat it 
doesn't work for some reason.....so my first thought is that it might have 
something to do with tomcat. anyway, 10x for the reply. About the Object error 
, this is the only alert I get. I don't know if there is a way to print a stack 
trace in javascript. In my try catch block I just put an alert(exception) in 
case I get any and all I get is [Object error].

10x in advance

----- Original Message ----
From: Nikola Milutinovic <[EMAIL PROTECTED]>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Sunday, March 23, 2008 1:38:08 PM
Subject: Re: tomcat and active x problem

> Hi, i have an html page that has a javascript function that opens an outlook 
> mail window .the function is pretty basic:
> 
> function OpenOutlookDoc()
> {try{
> var outlookApp = new ActiveXObject("Outlook.Application");
> var nameSpace = outlookApp.getNameSpace("MAPI");
> mailFolder = nameSpace.getDefaultFolder(6);
> mailItem = mailFolder.Items.add('IPM.Note.FormA');
> mailItem.Subject="a subject test";
> mailItem.To = "[EMAIL PROTECTED]";
> mailItem.HTMLBody = "<b>bold</b>";
> mailItem.display (0);
> }catch(e){
> alert(e);
> // act on any error that you get
> }}
> 
> if I run the file locally, with the url looking like: file://C:/....things 
> are ok, page works, if I copy
> the html page in one of my projects and run int like
> localhost:8080/project/file.html I get an [Object error] alert......i 
> remember reading somewhere
> about some problems using Active -x in tomcat.


First of all, this is entirely client side stuff, so it should not make any 
difference if it is deployed on Tomcat, Apache, WebSphere or IIS. In this 
script, there is no interaction with the server, whatsoever, so, it is not 
Tomcat related in any way.

You should give us more info on the "Object error" you're getting, but I must 
warn you - your problems are IE related and have nothing to do with TC, so you 
may get help, but then again, you may not.

Nix.




      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping


      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to