Results 1 to 3 of 3

Thread: [SOLVED] Problem grabbing info from object in doDrop

  1. #1
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default [SOLVED] Problem grabbing info from object in doDrop

    This bit of code is in my Zimlet JS. The problem I'm having is the obj.from/participants/attendees is not returning what I think it should.

    I'm expecting that to be something like this...
    "Joe Smith <j-smith@dom.edu>"

    However it is only giving me the name like this...
    "Joe Smith"

    Which doesn't help me because I need the email address. Can anyone help or tell me what I'm doing wrong?

    Matt

    Code:
    Edu_Wiu_Directory.prototype.doDrop = 
    function(obj) {
    ........
    	//get uid from various drag n drops in Zimbra
    	if (obj.TYPE == "ZmMailMsg") {
    		result = this.grabEcomEmail(obj.from);
    	} 
    	else if (obj.TYPE == "ZmConv") {
    		result = this.grabEcomEmail(obj.participants[0]);
    	}
    	else if (obj.TYPE == "ZmAppt") {
    		result = this.grabEcomEmail(obj.attendees[0]);
    	}
    ........
    Last edited by Chewie71; 12-18-2008 at 12:15 PM.

  2. #2
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    10

    Default

    emailObj has address, dispName, name(fullname) and type. you need to grab the address

    something like..
    Edu_Wiu_Directory.prototype.grabEcomEmail = function(emailObj) {
    return emailObj.address;
    }
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default

    My mistake....I was printing it out to a web dialog box.....and it was interpreting the <jsmith@here.com> part of the FROM as an HTML tag....so only presented me with the name part of the address.

    Just me being dumb I guess...

    Matt

Similar Threads

  1. Replies: 10
    Last Post: 10-22-2008, 10:24 AM
  2. Error after installation
    By robsontuxlinux in forum Installation
    Replies: 13
    Last Post: 09-11-2008, 09:48 PM
  3. Zimbra + LDAP + Posix + Samba
    By fruitlounge in forum Administrators
    Replies: 24
    Last Post: 06-30-2008, 09:55 PM
  4. The mailbox and mta dies in FC4 GA version
    By meikka in forum Installation
    Replies: 72
    Last Post: 03-16-2006, 04:30 PM
  5. Zimbra on Debian?
    By omry_y in forum Installation
    Replies: 25
    Last Post: 11-04-2005, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •