I am trying to control a form submit confirmation using a Fancybox confirmation message.
How can I add an event to the form submit using jQuery fancybox?
my form source is bellow:
<form name="oactivite" action="url" method="POST" onsubmit="return confirmTask(' do you confirm task : '+document.forms['oactivite'].elements['task_id'].options[this.document.forms['oactivite'].elements['task_id'].selectedIndex].text+'?');">
<select name="task_id" id="task_id">
<option value="1">Pause</option>
<option value="2">Digit</option>
<option value="3">editing</option>
</select>
<div name="emp_id" value="20" style="display:none" />
<input type="submit" value="validate task"/>
</form>
how can i show a fancybox confirm message when i call confirmTask ?