iam a beginner in javascript and need some help,
i want when user press delete button delete it from interface also delete from databse
i successed to remove from interface but i canot remove it from data base becouse it is server side and javascript is client side,.. plus i have to detect which row the user want to delete from table .....how can i do this???
here is the code
<TD><input type="button" name ="Delete" value ="Delete" onclick=del()> </TD>
function del()
{
var current = window.event.srcElement;
//here we will delete the line
while ( (current = current.parentElement) && current.tagName !="TR");
current.parentElement.removeChild(current);
}
i want when user press delete button delete it from interface also delete from databse
i successed to remove from interface but i canot remove it from data base becouse it is server side and javascript is client side,.. plus i have to detect which row the user want to delete from table .....how can i do this???
here is the code
<TD><input type="button" name ="Delete" value ="Delete" onclick=del()> </TD>
function del()
{
var current = window.event.srcElement;
//here we will delete the line
while ( (current = current.parentElement) && current.tagName !="TR");
current.parentElement.removeChild(current);
}