Newbie help

C

chappy110

I brand new to Jscript so please bear with me and any help is
appreciated. I have an app and I'm trying to create a new report using
Jscript. I have a some difficulty putting the language together that
will bring together elements from a contacts object and the related
associations records. The end result I going for is a semi-colon
delimited file (see second Response.Write statement) that includes
fields from both Contacts Object and the Associations. When I move
"var eAssociates" and "var oObj" lines out of the "for: brackets it
works, but it does not work as outline below. Thanks in advance for
any assistance.

Thanks
Andy

var enume = new Enumerator(Project.getContacts());
var oItem;
if (enume.atEnd())
{
Response.WriteLine("There are no contacts in the project.");
}
else
{
for (; !enume.atEnd(); enume.moveNext())
{
oItem = enume.item();
var eAssociates = new Enumerator(oItem.getAssociations());
var oObj = eAssociates.item();
Response.Write(oObj.Name)
Response.Write(oItem.Name + ";" + oItem.Title + ";" + oItem.HomePhone
+ ";" + oItem.DayPhone + ";" + oItem.emailaddress + "\n");

}


}
%>
 
R

RobG

(e-mail address removed) said on 23/03/2006 12:21 PM AEST:
I brand new to Jscript so please bear with me and any help is
appreciated. I have an app and I'm trying to create a new report using
Jscript.

This news group "deals with ECMAScript languages"[1], what you are
asking about belongs to JScript .NET.

You may get better support in a JScript .NET news group.

[...]
var enume = new Enumerator(Project.getContacts());

Enumerator is JScript .NET. Where is the Project object defined? Or its
getContacts method? Does it return the right kind of object (a collection)?

<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/jscript7/html/jsobjenumerator.asp>

[...]


1. <URL:http://www.jibbering.com/faq/#FAQ2_2>
 
C

chappy110

RobG - Thanks for replying - I figured out my issue last night. the
getContacts and getAssociation API return recordsets, so I needed a
nested "for" statement to read the Associations recordset (since there
could be more than one. That's why I was getting the "object does not
support property of method" error. Thanks Again - Andy
RobG said:
(e-mail address removed) said on 23/03/2006 12:21 PM AEST:
I brand new to Jscript so please bear with me and any help is
appreciated. I have an app and I'm trying to create a new report using
Jscript.

This news group "deals with ECMAScript languages"[1], what you are
asking about belongs to JScript .NET.

You may get better support in a JScript .NET news group.

[...]
var enume = new Enumerator(Project.getContacts());

Enumerator is JScript .NET. Where is the Project object defined? Or its
getContacts method? Does it return the right kind of object (a collection)?

<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/jscript7/html/jsobjenumerator.asp>

[...]


1. <URL:http://www.jibbering.com/faq/#FAQ2_2>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,259
Latest member
JorjaBurne

Latest Threads

Top