Copy link to clipboard
Copied
Hi everyone,
I am creating a web based application for managing support tickets.So, whenever user closes the ticket by submitting a form, I want to have a confirm message box popped up( yes/no). Depeneding upon the choice, the form should be either processed or not processed.I know this can be done using java script, but I am not very sure how to do it.I am using PHP and mysql. I would really appreciate if someone can help me out with this.
Thanks
Copy link to clipboard
Copied
Hi,
The html should looks like something similat
<input type="Submit" name="Close" value="Close ticket"
onClick="return confirmClose()">
the corresponding js function is
function confirmClose ()
{
var close=confirm("Are you sure you wish to close ticket?");
if (close)
return true ;
else
return false ;
}
Regards
Copy link to clipboard
Copied
Thanks a lot man,it works!