Hi,
I have an ASP page that brings loads an HTML table with data and needs to allow the user to edit some of the values; it uses AJAX to retrieve the data. The data in the <TD> tags can be edited in a TextArea element. Once the edits are complete, the user can click a Save button to write changes to the database. Then the TextArea element disappears and the data will refresh the <TD> with the new value.
My problem is in saving the data without refreshing the whole page.
The Save button calls update() below:
Thanks for the help.
I have an ASP page that brings loads an HTML table with data and needs to allow the user to edit some of the values; it uses AJAX to retrieve the data. The data in the <TD> tags can be edited in a TextArea element. Once the edits are complete, the user can click a Save button to write changes to the database. Then the TextArea element disappears and the data will refresh the <TD> with the new value.
My problem is in saving the data without refreshing the whole page.
The Save button calls update() below:
Code:
function update(UniqueID)
{
var sUpdateSQL;
sUpdateSQL = "EXEC sp_Table_upd @iExampleID = " + UniqueID;
[green]//The rest needs to happen on the client.[/green]
[!]Can the Save be handled with AJAX from the client?[/!]
[green]//I can't be sure ADO is loaded on the client's machine, so the rest is dicey.[/green]
var conn = new ActiveXObject("ADODB.Connection");
conn.Open(sConnString);
conn.Execute(sUpdateSQL);
conn.Close;
conn = null;
}
Thanks for the help.