How to manage CRUD for custom lightbox with validation?

Hello,

I have a scheduler with full customized lightbox. I need to validate each field using the server side. I follow the instructions in the sample as stated in http://scheduler-net.com/docs/validation.html#server_validation.

My button are coded as:

<div style="text-align:center">
       <input type="submit" name="actionType"  value="Save" />
       <input type="button" onclick="lightbox.close()/* helper-method*/" value="Close" />
       <input type="submit" name="actionType" value="Delete" />
</div>

How can I get the action type using the submit button?
How will I know if the action type is inserted, updated or delete?
I always get an action type “error”, does anyone know why?

Any help is much appreciation. Thanks!

You can try something like

<div style="text-align:center">
	<input type="hidden" name="actionType" id="actionType"  value="" />
	<input type="submit" value="Save" onclick='$$("#actionType").val("Save")' />
	<input type="submit" value="Delete" onclick='$$("#actionType").val("Delete")' />
	<input type="button" onclick="lightbox.close()/* helper-method*/" value="Close" />
</div>