please help me i am stuck

please help me i am stuck

Here both the functinality are not working. Only one of the two is working.

Can anyone please help me ?

In this below mentioned code there are 2 functions
1. $('#testform').submit(function(){
2.$("#testform1 > #text5").blur(function(){

both the functions works fine when both are in separate page, but fails to work when they are used in 2 forms in a single page.

[code]
<script type="text/javascript" language="javascript">
jQuery(document).ready(function($){

$('#testform').submit(function(){//validating login...
$("#msgbox").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);
$.post("login.php",{ username:$('#username').val(),password:$('#password').val(),rand:Math.random() } ,function(data){
if(data=='yes' || data=='Login Success' || data=='Login Success, Update Profile'){
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Logging in.....').addClass('messageboxok').fadeTo(900,1, function(){
if(data=='Login Success'){
document.location='dashboard.php';
} else if(data=='Login Success, Update Profile') {
document.location='dashboard.php';
} else {
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Please Activate Your account').addClass('messageboxerror').fadeTo(900,1);
});
}
});

});
}
else
{
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Invalid Username/Password').addClass('messageboxerror').fadeTo(900,1);
});
}
});
return false;
});



//below is checking of registerd usernames.


$("#testform1 > #text5").blur(function(){
alert($("#text5").val());
$("#msgbox").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);
$.post("emailvalidajax.php",{ do:'check_email_exists',emailaddress:$('#text5').val(),rand:Math.random() } ,function(data){
if(data!='This User ID is available.') {
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Checking .....').addClass('messageboxok').fadeTo(900,1, function(){
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Email Address already exists, please select another one.').addClass('messageboxerror').fadeTo(900,1);
});
});

});
} else {
$("#msgbox").fadeTo(200,0.1,function(){
$(this).html('Userid Available').addClass('messageboxok').fadeTo(900,1);
});
}
});
return false; //not to post the form physically
});
});
</script>
<link href="css/defaultcss.css" rel="stylesheet" type="text/css" />

<!--display message box-->
<span id="msgbox" name="msgbox"></span>
<!--display message box-->

<!--Login form starts from here-->
<form method="post" name="testform" id="testform" action="login.php">
Username : <input type="text" id="username" name="username"><br>
Password : <input type="password" id="password" name="password">
<input type="submit" id="login" name="login" value="Go">
</form>
<!--login form ends-->


<!--validate the data for existing usernames starts-->

<form method="post" name="testform1" id="testform1" action="emailvalidajax.php">
check Availability <input type="text" id="text5" name="text5">
<input type="submit" id="btn2" name="btn2" value="Check">
</form>
<!--validate the data for existing usernames ends-->

[/code]

all the above code properly indented in notepad

Thanks
Tusar