Hello,
I'm trying to add the equivalent of:
ID="Status"+[blk1.id] onClick="doqueryalertId('Status'+[blk1.id])"
Basically trying to set the ID= and the variable passed to a javascript function to be a set text + numerical value such as Status134 Status135 etc.. where the numerical value was taken from a database. I am having a problem getting the proper syntax down for the html portion of it...
my snippet of code that I want to add this to is here:
<td><div align="right">[blk1.Status;block=tr;ondata=change_status_blk1;.]</div></td>
|
For anyone that wants to do this.. this function basically identifies the cell and lets you change the value of the cell without refreshing the page. I plan to do a database update and then change the value in the table after the database update is verified to have been successful. I'll use AJAX to kick off the update and verify the change was successful in the database.
My unfinished javascript code is here.. just basic while I get the syntax down.. I don't need help with this part. If anyone wants the finished code , I'll post it when I'm done.
<script>
function domysqlupdate(what)
{
var location = document.getElementById(what);
location.innerHTML=what;
}
</script>
|