my gadget is a simple button and with a click it shows the flyout and with another click on the button it hides the flyout. so i made something like this:
Code Snippet
<div id="updateRadio" border="none" style="position:left;"
onclick="if (System.Gadget.Flyout.show == true){
System.Gadget.Flyout.show = false;
}
else System.Gadget.Flyout.show = true;">
<g:image src="button.png"/>
</div>
the problem is that when i click it shows the flyout normally but to close it i need to click 2 times on the button. it seems that after one click the gadget take the focus and with the second click it runs normally. am i right and what can i do to solve my problem
thx