Results 1 to 3 of 3

Thread: need help writing first zimlet

  1. #1
    Join Date
    May 2010
    Rep Power

    Default need help writing first zimlet

    Hey folks, I've been tasked with writing up a zimlet but I'm struggling a bit on one part as JavaScript isn't my strong suit.

    The zimlet is to recognize items in an email, and allow the user to hover over the item to get more information. The information would come from an intranet site on another server.

    I used the com_zimbra_example_customtooltip zimlet as my base and modified the regex to detect what I needed. And I have the php script on my other server that can take the information and use it to query the database.

    Where I'm having trouble is, I don't have a clue how to make the AJAX call to pass the value from the email to the php page and then use the value that's returned from it.

    Any help would be great (sample scripts would be marvelous).


  2. #2
    Join Date
    Apr 2007
    Paris, France
    Rep Power


    You can do AJAX calls with AjxRpc.

    Example of a GET request (take care to add the domain of the php page to the proxy allowed domains) :

    params = "?param="+ information;
    //Setting the URL
    url = ZmZimletBase.PROXY + AjxStringUtil.urlComponentEncode(urlPhpPage + params);
    //the AJAX call.
    var response = AjxRpc.invoke(null, url , null, null, true);

  3. #3
    Join Date
    May 2010
    Rep Power


    Thanks tdesorbaix. That seems to be working, but I'm getting hung up on the allowed domains. I'm working out of _dev and it doesn't appear to see the config_template.xml file where I'm allowing the domain. And when I try to deploy zimlets it's giving me an error (using ZD1) so I'm trying to figure that step out now.

    Thanks again.

Similar Threads

  1. Replies: 6
    Last Post: 03-05-2010, 12:13 AM
  2. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  3. Samba and POSIX undeploy problem
    By catnipper in forum Zimlets
    Replies: 0
    Last Post: 09-02-2009, 10:51 AM
  4. Replies: 5
    Last Post: 01-11-2008, 04:34 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 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