Click here to Skip to main content
15,900,480 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How do I create a modal Dialog without a Titlebar/close button in javascript Pin
theJazzyBrain10-Aug-06 4:54
theJazzyBrain10-Aug-06 4:54 
GeneralRe: How do I create a modal Dialog without a Titlebar/close button in javascript Pin
ramuvk10-Aug-06 20:08
ramuvk10-Aug-06 20:08 
QuestionRe: Thanks Pin
ramuvk10-Aug-06 20:14
ramuvk10-Aug-06 20:14 
QuestionHow i can use clipboard in a web application ? Pin
jagmit2010-Aug-06 0:20
jagmit2010-Aug-06 0:20 
AnswerRe: How i can use clipboard in a web application ? Pin
Paddy Boyd10-Aug-06 5:39
Paddy Boyd10-Aug-06 5:39 
Questionusing ctrl-c to copy data from Excel and paste into grid control using ctrl-v in java Pin
jagmit209-Aug-06 23:16
jagmit209-Aug-06 23:16 
QuestionHow to copy data from excel sheet & paste it into .net (web application) datagrid directly Pin
jagmit209-Aug-06 23:14
jagmit209-Aug-06 23:14 
Questionoutlook automation with javascript Pin
matrix_resident9-Aug-06 22:31
matrix_resident9-Aug-06 22:31 
dear all myfriends out there
i am working automating outlook using javascript
my project writtin in c# for the .net framework 2.0 and the automation is done using javascript
as far as i know about the javascript code is that it run on teh client computer so i put the automation code there to got the outlook contacts of the client visiting the page the code working fine but with a wired behaviour that if one goes to the page he see his outlook contacts but the next one trying to visite the page seeing the first one's contacts !!!! not his own ...although i am clothing the application after quiting the javascript function
...simply i discoverd that i need to restart iis to clean that object created by javascript...
please ... any explaination about this wired behaivour...!!!!

here is mycode:


function getContacts(){
document.getElementById('MyContacts').value="";

var nameSpace;
var contactsFolder;
var itemNode;
var categoryNode;

//OUTLOOK FIELDS MIRROR..
var otlk_Fields = new Array(153);
otlk_Fields[0]="Class";
otlk_Fields[1]="Session";
otlk_Fields[2]="Parent";
otlk_Fields[3]="Actions";
otlk_Fields[4]="Attachments";
otlk_Fields[5]="BillingInformation";
otlk_Fields[6]="Body";
otlk_Fields[7]="Categories";
otlk_Fields[8]="Companies";
otlk_Fields[9]="ConversationIndex";
otlk_Fields[10]="ConversationTopic";
otlk_Fields[11]="CreationTime";
otlk_Fields[12]="EntryID";
otlk_Fields[13]="FormDescription";
otlk_Fields[14]="GetInspector";
otlk_Fields[15]="Importance";
otlk_Fields[16]="LastModificationTime";
otlk_Fields[17]="MessageClass";
otlk_Fields[18]="Mileage";
otlk_Fields[19]="NoAging";
otlk_Fields[20]="OutlookInternalVersion";
otlk_Fields[21]="OutlookVersion";
otlk_Fields[22]="Saved";
otlk_Fields[23]="Sensitivity";
otlk_Fields[24]="Size";
otlk_Fields[25]="Subject";
otlk_Fields[26]="UnRead";
otlk_Fields[27]="UserProperties";
otlk_Fields[28]="Account";
otlk_Fields[29]="Anniversary";
otlk_Fields[30]="AssistantName";
otlk_Fields[31]="AssistantTelephoneNumber";
otlk_Fields[32]="Birthday";
otlk_Fields[33]="Business2TelephoneNumber";
otlk_Fields[34]="BusinessAddress";
otlk_Fields[35]="BusinessAddressCity";
otlk_Fields[36]="BusinessAddressCountry";
otlk_Fields[37]="BusinessAddressPostalCode";
otlk_Fields[38]="BusinessAddressPostOfficeBox";
otlk_Fields[39]="BusinessAddressState";
otlk_Fields[40]="BusinessAddressStreet";
otlk_Fields[41]="BusinessFaxNumber";
otlk_Fields[42]="BusinessHomePage";
otlk_Fields[43]="BusinessTelephoneNumber";
otlk_Fields[44]="CallbackTelephoneNumber";
otlk_Fields[45]="CarTelephoneNumber";
otlk_Fields[46]="Children";
otlk_Fields[47]="CompanyAndFullName";
otlk_Fields[48]="CompanyLastFirstNoSpace";
otlk_Fields[49]="CompanyLastFirstSpaceOnly";
otlk_Fields[50]="CompanyMainTelephoneNumber";
otlk_Fields[51]="CompanyName";
otlk_Fields[52]="ComputerNetworkName";
otlk_Fields[53]="CustomerID" ;
otlk_Fields[54]="Department";
otlk_Fields[55]="Email1Address";
otlk_Fields[56]="Email1AddressType";
otlk_Fields[57]="Email1DisplayName";
otlk_Fields[58]="Email1EntryID";
otlk_Fields[59]="Email2Address";
otlk_Fields[60]="Email2AddressType";
otlk_Fields[61]="Email2DisplayName";
otlk_Fields[62]="Email2EntryID";
otlk_Fields[63]="Email3Address";
otlk_Fields[64]="Email3AddressType";
otlk_Fields[65]="Email3DisplayName";
otlk_Fields[66]="Email3EntryID";
otlk_Fields[67]="FileAs";
otlk_Fields[68]="FirstName";
otlk_Fields[69]="FTPSite";
otlk_Fields[70]="FullName";
otlk_Fields[71]="FullNameAndCompany";
otlk_Fields[72]="Gender";
otlk_Fields[73]="GovernmentIDNumber";
otlk_Fields[74]="Hobby";
otlk_Fields[75]="Home2TelephoneNumber";
otlk_Fields[76]="HomeAddress";
otlk_Fields[77]="HomeAddressCity";
otlk_Fields[78]="HomeAddressCountry";
otlk_Fields[79]="HomeAddressPostalCode";
otlk_Fields[80]="HomeAddressPostOfficeBox";
otlk_Fields[81]="HomeAddressState";
otlk_Fields[82]="HomeAddressStreet";
otlk_Fields[83]="HomeFaxNumber";
otlk_Fields[84]="HomeTelephoneNumber";
otlk_Fields[85]="Initials";
otlk_Fields[86]="InternetFreeBusyAddress";
otlk_Fields[87]="ISDNNumber";
otlk_Fields[88]="JobTitle";
otlk_Fields[89]="Journal";
otlk_Fields[90]="Language";
otlk_Fields[91]="LastFirstAndSuffix";
otlk_Fields[92]="LastFirstNoSpace";
otlk_Fields[93]="LastFirstNoSpaceCompany";
otlk_Fields[94]="LastFirstSpaceOnly";
otlk_Fields[95]="LastFirstSpaceOnlyCompany";
otlk_Fields[96]="LastName";
otlk_Fields[97]="LastNameAndFirstName";
otlk_Fields[98]="MailingAddress";
otlk_Fields[99]="MailingAddressCity";
otlk_Fields[100]="MailingAddressCountry";
otlk_Fields[101]="MailingAddressPostalCode";
otlk_Fields[102]="MailingAddressPostOfficeBox";
otlk_Fields[103]="MailingAddressState";
otlk_Fields[104]="MailingAddressStreet";
otlk_Fields[105]="ManagerName";
otlk_Fields[106]="MiddleName";
otlk_Fields[107]="MobileTelephoneNumber";
otlk_Fields[108]="NetMeetingAlias";
otlk_Fields[109]="NetMeetingServer";
otlk_Fields[110]="NickName";
otlk_Fields[111]="OfficeLocation";
otlk_Fields[112]="OrganizationalIDNumber";
otlk_Fields[113]="OtherAddress";
otlk_Fields[114]="OtherAddressCity";
otlk_Fields[115]="OtherAddressCountry";
otlk_Fields[116]="OtherAddressPostalCode";
otlk_Fields[117]="OtherAddressPostOfficeBox";
otlk_Fields[118]="OtherAddressState";
otlk_Fields[119]="OtherAddressStreet";
otlk_Fields[120]="OtherFaxNumber";
otlk_Fields[121]="OtherTelephoneNumber";
otlk_Fields[122]="PagerNumber";
otlk_Fields[123]="PersonalHomePage";
otlk_Fields[124]="PrimaryTelephoneNumber";
otlk_Fields[125]="Profession";
otlk_Fields[126]="RadioTelephoneNumber";
otlk_Fields[127]="ReferredBy";
otlk_Fields[128]="SelectedMailingAddress";
otlk_Fields[129]="Spouse";
otlk_Fields[130]="Suffix";
otlk_Fields[131]="TelexNumber";
otlk_Fields[132]="Title";
otlk_Fields[133]="TTYTDDTelephoneNumber";
otlk_Fields[134]="User1";
otlk_Fields[135]="User2";
otlk_Fields[136]="User3";
otlk_Fields[137]="User4";
otlk_Fields[138]="UserCertificate";
otlk_Fields[139]="WebPage";
otlk_Fields[140]="YomiCompanyName";
otlk_Fields[141]="YomiFirstName";
otlk_Fields[142]="YomiLastName";
otlk_Fields[143]="Links";
otlk_Fields[144]="ItemProperties";
otlk_Fields[145]="LastFirstNoSpaceAndSuffix";
otlk_Fields[146]="DownloadState";
otlk_Fields[147]="IMAddress";
otlk_Fields[148]="MarkForDownload";
otlk_Fields[149]="IsConflict";
otlk_Fields[150]="AutoResolvedWinner";
otlk_Fields[151]="Conflicts";
otlk_Fields[152]="HasPicture";




//xml initialization

var xmlDocument = new ActiveXObject('Microsoft.XMLDOM');
var root = xmlDocument.createElement('olkContacts');
xmlDocument.documentElement = root;

//set the main contacts category in document
categoryNode =xmlDocument.createElement('olkCategory');
categoryNode.setAttribute('Name','Contacts');
root.appendChild(categoryNode);

//create outlook instance


var outlookApp = new ActiveXObject('Outlook.Application','<%=Request.ServerVariables["remote_addr"].ToString()%>');

nameSpace = outlookApp.getNameSpace("MAPI");
nameSpace.Logon("","", false, false);


//getContacts
contactsFolder = nameSpace.GetDefaultFolder(10);
var items = contactsFolder.items.restrict('[MessageClass] = "IPM.Contact"');




for(var itemsCount=1;itemsCount<=items.count;itemsCount++){
itemNode =xmlDocument.createElement('olkContact');
for(var fm=1;fm<otlk_Fields.length;fm++){
var pName = "otlk_Fields[" + fm + "]";
try{
itemNode.setAttribute(otlk_Fields[fm],items(itemsCount)[evalpName)]);
categoryNode.appendChild(itemNode);
}
catch(e)
{

}
}
}

// categories
var folders = contactsFolder.folders;
for(var folderscount=1;folderscount<=folders.count;folderscount++){

//set the current category in document

categoryNode =xmlDocument.createElement('olkCategory');
categoryNode.setAttribute('Name',folders(folderscount).Name);
root.appendChild(categoryNode);

// get contact content for category

for(var foldersItemsCount=1;foldersItemsCount<=contactsFolder.folders(folderscount).items.count;foldersItemsCount++){
var subitems = contactsFolder.folders(folderscount).items.restrict('[MessageClass] = "IPM.Contact"');
itemNode =xmlDocument.createElement('olkContact');
for(var sfm=1;sfm var pSName = "otlk_Fields[" + sfm + "]";
try{
itemNode.setAttribute(otlk_Fields[sfm],subitems(foldersItemsCount)[eval(pSName)]);
categoryNode.appendChild(itemNode);
}
catch(e){
}
}
}
}

//make request not dangrous and set hidden field for server action
document.getElementById('MyContacts').value= xmlDocument.xml.replace(/(<)/g,"<").replace(/(>)/g,'>');
outlookApp.application.quit();
outlookApp.quit();
outlookApp=null;

}



A.Farouk

QuestionIs there a way to embed an image in an html file? Pin
tigre2159-Aug-06 15:11
tigre2159-Aug-06 15:11 
AnswerRe: Is there a way to embed an image in an html file? Pin
eggsovereasy10-Aug-06 3:49
eggsovereasy10-Aug-06 3:49 
AnswerRe: Is there a way to embed an image in an html file? Pin
Sidonath11-Aug-06 5:00
Sidonath11-Aug-06 5:00 
QuestionASP Datagrid Problems Pin
Soot9-Aug-06 5:13
Soot9-Aug-06 5:13 
QuestionDefault image Pin
cj43319-Aug-06 4:24
cj43319-Aug-06 4:24 
QuestionNearest Distributor Based on Zip Code Pin
packerfan19049-Aug-06 3:29
packerfan19049-Aug-06 3:29 
AnswerRe: Nearest Distributor Based on Zip Code Pin
Paddy Boyd9-Aug-06 3:42
Paddy Boyd9-Aug-06 3:42 
Questionhow to develop a amazon like popup effect by javascript? Urgent! Pin
Tridip Bhattacharjee9-Aug-06 2:14
professionalTridip Bhattacharjee9-Aug-06 2:14 
AnswerRe: how to develop a amazon like popup effect by javascript? Urgent! Pin
RichardGrimmer17-Aug-06 5:59
RichardGrimmer17-Aug-06 5:59 
GeneralRe: how to develop a amazon like popup effect by javascript? Urgent! Pin
Tridip Bhattacharjee17-Aug-06 18:31
professionalTridip Bhattacharjee17-Aug-06 18:31 
QuestionEnabling Javascript functions when called from a flash object Pin
Bhargavi9-Aug-06 0:07
Bhargavi9-Aug-06 0:07 
QuestionHow can I put a text value into Textarea, which is a part of asp-Table? [modified] Pin
HilSoft8-Aug-06 7:50
HilSoft8-Aug-06 7:50 
AnswerRe: How can I put a text value into Textarea, which is a part of asp-Table? Pin
led mike8-Aug-06 11:18
led mike8-Aug-06 11:18 
AnswerRe: How can I put a text value into Textarea, which is a part of asp-Table? Pin
Guffa8-Aug-06 23:14
Guffa8-Aug-06 23:14 
QuestiongetXYclicked() on an image, on a webpage Pin
Ricardo Ramalho8-Aug-06 0:46
Ricardo Ramalho8-Aug-06 0:46 
AnswerRe: getXYclicked() on an image, on a webpage Pin
RichardGrimmer17-Aug-06 6:00
RichardGrimmer17-Aug-06 6:00 
AnswerRe: getXYclicked() on an image, on a webpage Pin
Rameez Mohammed17-Aug-06 20:56
Rameez Mohammed17-Aug-06 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.