Skip to navigation
How to update form text fields with jquery ajax?
07.12.13
example for ramaze framework: view:
javascript: /************************** * i_input ***************************/ $(".i_ajax").change(function() { v = $(this).val(); a = $(this).attr("data-ajax").split(",") $.ajax({ type: "POST", url: "/admin/" + a[0], data: {id: a[1],f:a[2],v: v}, success: function(msg){ } }); }); controller: if request.post? dealer = User[request.params['id']] user.update(request.params['f'] => request.params['v']) end
Reply
Anonymous
How to update form text fields with jquery ajax?
example for ramaze framework: view:
javascript: /************************** * i_input ***************************/ $(".i_ajax").change(function() { v = $(this).val(); a = $(this).attr("data-ajax").split(",") $.ajax({ type: "POST", url: "/admin/" + a[0], data: {id: a[1],f:a[2],v: v}, success: function(msg){ } }); }); controller: if request.post? dealer = User[request.params['id']] user.update(request.params['f'] => request.params['v']) end
07.12.13
Reply
Anonymous
Information Epoch 1732450290
Programmer time is expensive, conserve it in preference to machine time.
Home
Notebook
Contact us