just pass 2 arguments to your js function - id AND name of
category:
<input type="submit" name="proj_Delete" onClick="return
confirmDelete(#ID#,'#ViewField1#')" value="Delete">
and the function:
function confirmDelete(id,name) {
if (confirm ("Are you sure you want to delete " + name + "
category?"))
{
document.HREF.action="ProjectCat-Action.cfm?id="+id;
document.HREF.submit();
}
return false;
}
but creating a separate form for each category displayed on
the page is
very inefficient - you should revise your code... you do not
even need a
form, really... just use <a href=...> to call your js
function, or an
<input type=button ...> (without any <form ..>
tags) if you absolutely
must have a button to click...
---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com