I want to change the submit function of form in iframe from the parent frame. The following code should do that, but nothing hapen. And no error shown in chrome’s debugger. What is wrong?
<iframe src="test.php" id="frame"></iframe>
<script type="text/javascript">
$("#frame").contents().find("form").submit(function(){
return true;
});
</script>
Make sure that you are manipulating the DOM of this iframe once its contents has been loaded by wrapping your call inside a
.loadcallback: