[SOLVED] Accessing into Sent folder

Interested in talking about Mash-up's? This is the place.
Post Reply
charly7
Posts: 2
Joined: Thu Jan 12, 2017 7:52 am

[SOLVED] Accessing into Sent folder

Post by charly7 »

Hello everyone, I need to create a link, that when I click, it goes to the send folder. How can I do?
I've tried doing this:
I have in appActive: "<a onclick="testFolderMail()"> Mail</a>"
"<a onclick="testFolderSent()"> Sent</a>"

and the functions :
function testFolderMail(){
appCtxt.getAppController().activateApp("Mail");
}
function testFolderMail(){
appCtxt.getAppController().activateApp("Sent");
} --> But unfortunately it does not work, some help or idea?
Thank you very much.
Last edited by charly7 on Wed Mar 29, 2017 7:49 am, edited 2 times in total.
charly7
Posts: 2
Joined: Thu Jan 12, 2017 7:52 am

Re: Accesing into Sent folder

Post by charly7 »

well I found the solution:

function testFolderSent() {
function triggerMouseEvent (node, eventType) {
var clickEvent = document.createEvent ('MouseEvents');
clickEvent.initEvent (eventType, true, true);
node.dispatchEvent (clickEvent);
}
//zti__main_Mail__2 --> Mail
//zti__main_Mail__4 --> Spam
//zti__main_Mail__5 --> Sent Folder
var targetNode = document.getElementById("zti__main_Mail__5")
if (targetNode) {
//--- Simulate a natural mouse-click sequence.
//triggerMouseEvent (targetNode, "mouseover");
triggerMouseEvent (targetNode, "mousedown");
triggerMouseEvent (targetNode, "mouseup");
//triggerMouseEvent (targetNode, "click");
}
}
Post Reply