Hi all,
I have prepared a html file (embedded in javascript codes), and want to load by tab zimlet. I have packaged the html file into the zimlet zip file and have deployed it. However, the zimlet say "Not Found" the loaded html when it was activated.
My codes to load the html file is as follows:
--- com_zimbra_mytabex.js ----
...
com_zimbra_mytabex_HandlerObject.prototype.appActi ve =
function(appName, active) {
switch(appName) {
case this._tabAppName: {
if (active) {
var app = appCtxt.getApp(this._tabAppName);
// load my html file
app.setContent("<iframe src= \"mytestpage.html\" width= \"100%\" height= \"100%\"> </iframe>");
var toolbar = app.getToolbar();
toolbar.setContent("<b>...</b>");
var overview = app.getOverview();
overview.setContent("<b>...</b>");
var controller = appCtxt.getAppController();
var appChooser = controller.getAppChooser();
// change the tab label and tool tip
...
}
break;
}
}
};
----------------- end ------------------
The mytestpage.html has been zipped in the zimlet packages, and I don't know why it still can not be found when zimlet is activated.
On the other hand, when I replaced the parameter "mytestpage.html" to "http://www.baidu.com" in app.setContent(), it works. Does it only support URL, but local file?Are there any ways to load the html file? and how?
Thanks in advance,
Tony


LinkBack URL
About LinkBacks



