Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2006, 05:36 PM
Authorized User
 
Join Date: Feb 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default object

The following code gives me this error: object expected at the line starting with app.

<script language="javascript">
   var app;
   var ns;
   var calendarfolder;
   app = CreateObject("Outlook.Application");
   ns = app.GetNameSpace("MAPI");
   calendarfolder = app.GetDefaultFolder
             (olDefaultFolders.olFolderCalendar);
   document.write(calendarfolder)
</script>

 
Old April 12th, 2006, 06:57 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

change CreateObject to
Server.CreateObject

www.crmpicco.co.uk
www.ie7.com
 
Old April 12th, 2006, 07:29 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Seeker55 & Crmpicco!!

Server.createObject won't work at all.

1>this script is used for client side,in order to work with server.createobject you need to change it "runat=server" tag too.
Again as you are using document.write it means you are try to use client side javascript.

Following links will help you
http://cwashington.netreach.net/depo...ptType=jscript
http://www.oreillynet.com/pub/a/java...detection.html


Cheers :)

vinod
 
Old April 12th, 2006, 08:20 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

yeah, sorry vinod, forgot about the runat=server

www.crmpicco.co.uk
www.ie7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
object reference not set to instant of an object shahidrasul ASP.NET 2.0 Basics 1 September 5th, 2008 02:01 PM
Serializing Object Graph - Assigning Object to Jag venkat.kl C# 0 August 28th, 2006 10:39 AM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 06:51 AM
Error Occurred creating Report Object: Object does sa_moizatyahoo Classic ASP Professional 0 February 1st, 2005 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.