Hi all,
I want to use JavaScript in my OutlookToday page (which gets shown inside Outlook explorer).
In the document's load event I call the javascript function:
<script language="javascript" type="text/javascript">
function InvokeJS()
{
var outlookApp = new ActiveXObject("Outlook.Application");
var nameSpace = outlookApp.getNameSpace("MAPI");
var mailFolder = nameSpace.getDefaultFolder(6);
alert("JavaScript onload successful");
}
</script>
</head>
<body onload="javascript:InvokeJS();">
This code runs successfully when the page re-loads after it is submitted to server, and got back. (As in postback.)
However, when the page opens for the first time, this code fails.
Am I doing anything wrong?
Any pointers?
TIA,
Sheila
I want to use JavaScript in my OutlookToday page (which gets shown inside Outlook explorer).
In the document's load event I call the javascript function:
<script language="javascript" type="text/javascript">
function InvokeJS()
{
var outlookApp = new ActiveXObject("Outlook.Application");
var nameSpace = outlookApp.getNameSpace("MAPI");
var mailFolder = nameSpace.getDefaultFolder(6);
alert("JavaScript onload successful");
}
</script>
</head>
<body onload="javascript:InvokeJS();">
This code runs successfully when the page re-loads after it is submitted to server, and got back. (As in postback.)
However, when the page opens for the first time, this code fails.
Am I doing anything wrong?
Any pointers?
TIA,
Sheila