Dear All,
I am making a zimlet that can detect whether the user using which locale.
There is a field inside SOAP request GetInfoRequest, zimbraPrefLocale
The request can be called, but I don't know how to read the value inside the tag.
The response structure is:
<GetInfoResponse>
<version>{version}</version>
<id>{account-id}</id>
<attrs>
<attr name="{name}">{value}</a>
...
<attr name="{name}">{value}</a>
</attrs>
<prefs>
<pref name="{name}">{value}</pref>
...
<pref name="{name}">{value}</pref>
</prefs>
I want to get the value between <pref name="zimbraPrefLocale"> and </pref>
And the code inside the js is:
And the result is "h is undefined"....Code:abc_HandlerObject.prototype.getAccountInfo = function(result) { if (result.isException()) { var exception = result.getException(); alert(exception); return; } try{ var response = result.getResponse().GetInfoResponse; var pre = response.prefs.pref; for (var i=0;i<pre.length;i++){ if (pre[i].name=="zimbraPrefLocale"){ alert(pre[i]); break; } } }catch(e){ alert(e.message); } };
I have followed the coding in options tab in client
the code from the web works in my server, but my code do not work...


LinkBack URL
About LinkBacks

