[jQuery] ie submiting ajax forum in thick box
Currently I have a login form being displayed in a thickbox(v 2.1), the actual form submission is handeled by the form plugin, from malsup.com(v 0.9).
In Firefox when a user enters there username/password the form submits how it should, and data is returned. In IE the form submits and goes to the actual page.
my JS looks like this. this is in gloabl.js which is included after jquery.js that is included in the header.
$(document).ready(function() {
//login
$("#jq_login").submit(function(){
$(this).<span class="plugin">ajaxSubmit</span>({
dataType: 'json',
success: process
});
return false;
});
//end login
/*
// I have also tried this, produces the same results
$("#jq_login").ajaxForm({
dataType: 'json',
success: process
});
*/
});
function process(data)
{
alert(data.message);
}
I am calling the thick box like so,
<span class="nodeLabelBox repTarget"><<span class="nodeTag">a</span><span class="nodeAttr editGroup"> <span class="nodeName editable">class</span>="<span class="nodeValue editable">thickbox</span>"</span>
<span class="nodeAttr editGroup"> <span class="nodeName editable">name</span>="<span class="nodeValue editable">Log In</span>"</span><span class="nodeAttr editGroup"> <span class="nodeName editable">href</span>="
<span class="nodeValue editable">templates/login.php?width=400&height=300</span>"</span><span class="nodeBracket editable insertBefore">></span><span class="nodeText editable">log in</span></<span class="nodeTag">
a</span>>
my form looks like this, which is in a seperate file,
<script type="text/javascript" src="templates/jQuery.js"></script>
<script type="text/javascript" src="templates/global.js"></script>
<form id="jq_login" method="post" action="includes/login.php">
<input type="text" name="name">
<input type="password" name="pwd">
<input type="submit">
</form>
I've read several of the posts here, and I am completely stumped as to why this is happening.
</span>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/