I just confused with jquery dialog and with php form submit
I have two forms, page1.php and page2.php
In page1.php, I have <a> link
<a id="addNew"> Add New </a>
<div id="myDiv">
<!-- load 'page2.php' file using this div -->
</div>
and when I click this link , load page2.php file in jquery dialog with form values.
This is my script
<script>
$("#addNew").click(function() {
$("#myDiv").load('page2.php').dialog({modal:true});
});
</script>
These scripts works fine load with page2.php file.
Now my question is,
when I submit form values of page2.php it will be re-directed to page2.php.
But I wants to stay with my page1.php.
How to I achieve this? Thanks in advance