I don’t know anything about java nor html. I tried searching but didn’t get it to work.
I found a recycle-bin gadget for windows 7 and I wanted it to open recycle-bin folder when onclick and empty when ondplclick.
Basically the bin.html onclick="openBin();" ondblclick="emptyBin(); calls for these two function in the bin.js
function openBin() {
System.Shell.execute('shell:RecycleBinFolder');
}
function emptyBin() {
System.Shell.RecycleBin.emptyAll();
}
I wanted that when double click the gadget, it cancels the openBin()
I tried Timeout, read about queue and Eventhandler but could not get it to work.
As I said I am no coder.
Thank you in advance.
First of all this is so obtrusive javascript :(. Makes me sad panda.
Onclick event will be always triggered first so you will have to rethink what you want to do.
If you want to not-show open bin window maybe consider doing something like different logic in onclick. i suggest onclick -> opens bin , onclick with shift -> empty him.
this will only require adding if with alt key code pressed for it 🙂
You can read about keycodes in javascript more here http://www.javascriptkit.com/javatutors/javascriptkey2.shtml