Not too sure about that. What I would do is put an onsubmit action in the form element.
<form name="deleteform" method="post" action="<? echo $_SERVER?>" onsubmit="return checkdelete();">
hooray commented: good solution +1
buddylee17 216 Practically a Master Poster
Ramy Mahrous commented: Very good (Y) +2
buddylee17 216 Practically a Master Poster
buddylee17 216 Practically a Master Poster