Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 93032

Re: Re: Re: Problems with show()

$
0
0

OK here we go finally figured this out.





var w = new Window ('dialog'), 



rb1 = w.add('radiobutton', undefined, "Jake (onClick deselect => will be deselected but probably remain active)"), 



rb2 = w.add('radiobutton', undefined, "John (addEventListener deselect => will not be deselected and probably remain active)"); 



rb3 = w.add('radiobutton', undefined, "Jim (addEventListener deselect onCLick clickDeselect => if you insist on using addEventListener then you can combine it with an onClick"); 



var countClick=0;



rb1.onClick = deselect; // => will be deselected but probably remain active 







rb2.addEventListener('mousedown', deselect); // => will not be deselected and probably remain active 



rb3.addEventListener('mousedown', deselect); 



rb3.onClick =  onClickDeselect// => if you insist on using addEventListener then you can combine it with an onClick 








w.show();  








function deselect () {      
$.writeln("Hi from " + this.text); // If you change the $.writeln to alert then the results will be different    
this.value = this.active = false;



} 







function onClickDeselect () {


    
countClick+=1;    
countClick=countClick%2;    
if(countClick==0){this.value = false; this.active = false; }   
else{this.value = true; this.active = true; }   

Viewing all articles
Browse latest Browse all 93032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>