Jam.py (web framework): Difference between revisions

Content deleted Content added
mNo edit summary
m example
Line 28:
 
== Example ==
The following code adds a form button. and whenWhen clicked, the message will show a message and
send the asynchronous request sent to the server. After the server response, hidingcalculated_value field is updated and the message after responsehidden.
 
Server Module ([[Python (programming language)|Python]]):
Line 45:
let mess = item.message('Calculation in progress!', {close_on_escape: false, margin: 20, text_center: true});
item.server('calculate', [100, 200], function(result) {
item.calculated_value.value = result;
item.hide_message(mess);
});