-->
Page 2 of 3

Re: Radio button not working

PostPosted: Sun Dec 31, 2017 5:31 pm
by martinayotte
MicroAjax is a small footprint javascript to do Ajax call. It can be found here :

https://code.google.com/archive/p/microajax/

So, in your HTML page simply include this script and do the calls with onClick of your button :

Code: Select all<html><head><script src='/microajax.js' type='text/javascript'></script></head><body>
<input type='button' style='width:100px;height:30px' value='LED_ON' onClick="microAjax('/TurnOnLED', function(res) { } );" /><br>
<input type='button' style='width:100px;height:30px' value='LED_OFF' onClick="microAjax('/TurnOffLED', function(res) { } );" /><br>
</body></html>

Re: Radio button not working

PostPosted: Wed Jan 03, 2018 5:24 am
by potz
Thanks martinayotte!

But why is microajax needed ? Because for the "standard" button it's not required ?

Thanks and happy new year

Re: Radio button not working

PostPosted: Wed Jan 03, 2018 6:14 pm
by martinayotte
Simply because it is smaller than using plain Ajax or JQuery...

Re: Radio button not working

PostPosted: Wed Jan 03, 2018 9:07 pm
by rudy
potz wrote:But why is microajax needed ? Because for the "standard" button it's not required ?

https://en.wikipedia.org/wiki/Ajax_(programming)