Simple Ajax Request on button in a row
Simple Ajax Request on button in a row
I all, I have searched the forum for an answer to my question. I am not a well versed or any verse in javascript. What I am trying to do is very simple.
I want to have a hidden column with an id. Then I want a column with a button for each row that when clicked will make a ajax request to start a background process, the loding img should appear and when finished it will return some text.
So here is my js code;
[code] $.ajaxSetup ({
cache: false
});
var ajax_load = "";
var loadUrl = 'hadoop/train';
$("#train").click(function(){
$("#result")
.html(ajax_load)
.load(loadUrl, null;
});
[/code]
and here is my button code, which I have no clue how to fire the #train event, tried an onclick but no go.;
[code]
[/code]
Thanks in advance, your help is greatly appreciated.
I want to have a hidden column with an id. Then I want a column with a button for each row that when clicked will make a ajax request to start a background process, the loding img should appear and when finished it will return some text.
So here is my js code;
[code] $.ajaxSetup ({
cache: false
});
var ajax_load = "";
var loadUrl = 'hadoop/train';
$("#train").click(function(){
$("#result")
.html(ajax_load)
.load(loadUrl, null;
});
[/code]
and here is my button code, which I have no clue how to fire the #train event, tried an onclick but no go.;
[code]
[/code]
Thanks in advance, your help is greatly appreciated.
This discussion has been closed.
Replies
Sorry for the bump, could someone please help me with this. I know it is simple but I just can't seem to figure it out.
Thanks
Allan