Re: [Rails] Form Ajax in Rails ?

2016-02-29 Thread Walter Lee Davis
> On Feb 28, 2016, at 10:18 PM, Le Hung wrote: > > I'm new in Rails. > > I'm trying to add a form with ajax.It's just typing a text and submit to > file 'ex/act' and show the param in form. > > My code: > > >function loadDoc(url, cfunc) { > var xhttp; > xhttp=new XMLHttpRequest

[Rails] Form Ajax in Rails ?

2016-02-28 Thread Le Hung
I'm new in Rails. I'm trying to add a form with ajax.It's just typing a text and submit to file 'ex/act' and show the param in form. My code: function loadDoc(url, cfunc) { var xhttp; xhttp=new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.re