Jquery form submit() call back not working
Posted
by Aneesh
on Stack Overflow
See other posts from Stack Overflow
or by Aneesh
Published on 2010-04-06T10:21:37Z
Indexed on
2010/04/06
10:23 UTC
Read the original article
Hit count: 203
jQuery
I have an iframe and a form. Form's target is iframe. When I submit form, the result page should load in iframe. I have attached the code below:
<script type="text/javascript">
function submitForm() {
$("form#testForm").submit(function(){
alert('hii') }); }
</head>
<body>
<iframe name="testFrame" id="testFrame" frameborder="1" scrolling="no" width="500" height="200"></iframe>
<form name="testForm" id="testForm" action="http://www.yahoo.com" target="testFrame"> </form>
<button name="testBtn" value="submit" onclick="submitForm();">submit</button>
</body>
</html>
The alert is not coming....Help me please...
© Stack Overflow or respective owner