yes, when you submit the form via js, the submit button is
not 'clicked'
and thus it is not submitted with the form.
what you need to do is create a hidden field and populate it
with some
value in your js function, then check for that field and its
value on
the action page.
something like this:
--the form:
<form name="myform" id="myform" ...>
<input type="hidden" name="form_action" id="form_action"
value="">
...
</form>
--js:
function confirmDelete(ID_Field,ViewField1) {
if (confirm ("Are you sure you want to delete " + ViewField1
+ " event?"))
{
document.myform.action="ProjectCat-Action.cfm?id="+id;
document.myform.form_action.value="EventView_Edit";
document.myform.submit();
}
return false;
}
--action page:
<cfif isDefined("Form.EventView_Edit") OR
(isdefined("form.form_action")
AND form.form_action eq "EventView_Edit")>
...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/