Hi, I tried to make a submit form with ketchup.js and the form work.. and now I don't now how to make a pop up appear when the submit value error...
this is my submit.php form :
<html>
<head>
<script src="../js/jquery.ketchup.messages.js"></script>
<script src="../js/jquery.ketchup.validations.basic.js"></script>
<body>
<form action="../include/example.php" class="add_user" method="post" enctype="multipart/form-data">
<table>
<tr>
<td><label for="username">username</label></td>
<td><input type="text" id="username" class="validate(required)" /></td>
</tr>
<tr>
<td><label for="email1">Email</label></td>
<td><input type="text" id="email1" class="validate(required)" /></td>
</tr>
<tr>
<td><label for="email2">Confirm Email</label></td>
<td><input type="text" id="email2" class="validate(required, match(#email1))"/></td>
</tr>
</table>
<div class="submit">
<input type="submit" value="Submit" />
</form>
</body>
I want to get the $_POST['email2'] as a trigger to the pop up error but I cannot figure out how..I tried with Jquery dialog but doesn't work.
And I tried to make this simple code to see if my method to get the $_POST['email2'] value is right but the page don't show anything and no error..this is my code when the submit button press
<?php
if(isset($_POST['email2'])) {
echo "Email Address Not Valid";
}
?>
Can anyone help me show where I was wrong please...
Thanks to Sergey Alexandrovich Kryukov Now i can make the pop up .dialog() appear when I press submit button
I add html like this
<script>
$(document).ready(function() {
$('.submit').click(function () {
$('.pop_up').dialog({
resizable: false,
draggable: false,
height:110,
width:300,
position: "right bottom",
});
});
});
</script>
<div class="pop_up" title="Email Not Valid">
<p>Type Your Email Again</p>
<img src="../images/peringatan.png" style="float: left; position: relative; top:-17px; left:-5px;" />
</div>
But the text inside div appear in mail page to..How can I make this text only appear in .dialog() pop up?
If I tried to use css display-property {display:none}, the text won't show up both in main or pop up...