zohoprojects.invoke("modal.create",modal_location);
| आर्गुमेंट का नाम | डेटा टाइप | विवरण |
| action | string | "modal.create" - एक मोडल बॉक्स बनाता है या खोलता है। |
| modal_location | Object | उस HTML फ़ाइल का सापेक्ष पथ जिसे invoke करना है। उदाहरण: {"url":"/app/choosefiles.html"}; |
आउटपुट के रूप में एक widget ID और एक string constant जेनरेट किया जाता है।
zohoprojects.invoke("modal.close",modalInfo.widgetID);
| आर्गुमेंट का नाम | डेटा टाइप | विवरण |
| action | string | "modal.close" - खुले हुए मोडल बॉक्स को बंद करता है। |
| widgetID | Object | "modal.create" के आउटपुट के रूप में जेनरेट किया गया widgetID यहाँ पास किया जाना चाहिए। |
एक्सटेंशन के iframe इंस्टेंस को निर्दिष्ट आकार में फिर से आकार देता है।
zohoprojects.invoke("modal.resize", resize_modal);
| आर्गुमेंट का नाम | डेटा टाइप | विवरण |
| action | string | "modal.resize" - मोडल बॉक्स के डिफ़ॉल्ट आकार को बढ़ाता है। |
| resize_modal | Object | उस HTML फ़ाइल का सापेक्ष पथ जिसे invoke करना है। उदाहरण:{"width" : 600,"height" : 400}; न्यूनतम और अधिकतम अनुमत ऊँचाई 380px और 450 px है। न्यूनतम और अधिकतम अनुमत चौड़ाई 550px और 950 px है। |
आउटपुट के रूप में एक widget ID और एक string constant जेनरेट किया जाता है।
एक्सटेंशन के iframe इंस्टेंस को बंद करता है जो निर्दिष्ट स्थान में एक फ़ाइल संलग्न करने के लिए खुला था।
zohoprojects.invoke("attachment_picker.close");
एक विशिष्ट widget के लिए एक instance बनाता है।
zohoprojects.instance(widget_ID);
| आर्गुमेंट का नाम | डेटा टाइप | विवरण |
| ID | string | invoke विधि से जेनरेट किया गया Widget ID। |
वर्तमान स्थान से डेटा को प्रेषित करता है।
zohoprojects.emit("KeyforMyListener", data);
emit विधि से डेटा को सुनता है या प्राप्त करता है।
zohoprojects.on("KeyforMyListener", data);
var modal_location={"url":"/apps/file.html"};
zohoprojects.invoke("modal.create",modal_location).then(function(modalInfo){
var modalInstance=zohoprojects.instance(modalInfo.widgetID);
modalInstance.on("modal.opened", function(){ /* This code listens for the status 'modal.opened' from the child HTML - file.html */
var data = {org: "1234"};
modalInstance.emit("submit", data);
});/* This code throws a status 'submit' along with an object to the child HTML - file.html*/
modalInstance.on("submitted",function(data){
/*This code listens for a status with the key 'submitted' from the child HTML*/
zohoprojects.invoke("modal.close", modalInfo.widgetID);
});
मान लीजिए कि निम्नलिखित नमूना कोड ब्लॉक चाइल्ड फ़ाइल '/apps/file.html' से कॉल किया जाता है और '/apps/index.html' पैरेंट फ़ाइल है।
var filedetails = {"filename": "abc"};
zohoprojects.on("submit", function (data) {});
/*This code listens for an event with the key "submit" from the parent file index.html */
zohoprojects.emit("submitted", filedetails);
/* This code throws a status 'submitted' along with an object to the parent file index.html */
सफलता या विफलता के अलर्ट सेट करें और प्रदर्शित करें।
zohoprojects.invoke("alert", {
type: "success", //or "failure"
data: "Permission granted successfully"
});
Task transition को पूर्ण के रूप में चिह्नित करें
zohoprojects.invoke("completeTaskTransition"); Task transition पॉप-अप को बंद करें
zohoprojects.invoke("closeTransition");