This is the original script of fancybox
<script>
$(document).ready(function() {
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'go.php',
type : 'iframe',
padding : 5
});
});
});
</script>
I want to send the data from the following form to POST them to "go.php" page via fancybox iframe script
I want to open "go.php"
in the same/current window via fancybox
<form name="fancy" action="go.php" method="POST">
<input name="text1" type="text">
<input name="text2" type="text">
**<input type="button" value="Submit" id="fancybox-manual-b"/>
**<input type="submit" value="Submit" id="fancybox-manual-b"/>
</form>
If I used type="button"
, fancybox iframe works but POST don't send anything to go.php
If I used type="submit"
, fancybox iframe doesn't work but POST sends the form data to go.php correctly