You're doing it right, but there are a couple of things to keep in mind.
Using $.post(url, {input_n: input_number}); is easier than using $.ajax, but
that's merely preference. The other thing you should know is that if a
web2py ticket is generated during an AJAX call, you will not know about
On Jul 8, 3:02 pm, Ross Peoples ross.peop...@gmail.com wrote:
You're doing it right, but there are a couple of things to keep in mind.
Using $.post(url, {input_n: input_number}); is easier than using $.ajax, but
that's merely preference. The other thing you should know is that if a
web2py
Going from web2py - JavaScript is easy:
{{=var}}
However, going from JavaScript - web2py requires an AJAX call. Since
JavaScript is run on the user's machine and not the web server, the two
machines have to communicate somehow, which is where AJAX comes in. You
should also know that things
You need to have the AJAX URL formed in a way that invokes a controller.
eg /application_name/controller_name/function_name/arg0/arg1 .
and include the variable(s) you want to send back. The variables can be
either addition items after the function as above where they show up as args
or if
I tried the following:
function submit_form(input_number, input_egn) {
$('input#user_input_number').val(input_number);
$('input#user_input_egn').val(input_egn);
$.ajax({
url: http://127.0.0.1:8000/games/xs-software/vaucher.html;,
method:
On Jul 7, 9:47 pm, Vasil Petkov petko...@dir.bg wrote:
I tried the following:
function submit_form(input_number, input_egn) {
$('input#user_input_number').val(input_number);
$('input#user_input_egn').val(input_egn);
$.ajax({
url:
6 matches
Mail list logo