I have a form which calls onSubmit="return report();". I have this javascript function in separate file. I would like to create my own jQuery UI Dialog instead of javascript confirm but I don't understand jQuery at all. How should I change javascript function report() to obtain jQuery UI Dialog?
There is part of my php file:
<form method="POST" action="add.php" name="alert" id="alert" onSubmit="return report();">
//some inputs
<button class='btn btn-primary' type='submit'>Send it</button>
And my js file:
function report() {
var report="Some text: \n\n";
//There is code in simple javascript
raport=raport+"\n";
raport=raport+"If the are no mistakes click OK";
return confirm(report);
}