/    Sign up×
Community /Pin to ProfileBookmark

Jquery slidedown function problem

Hi,

I am getting some problem to Jquery slideDown function its not working. The problem is that when user try to

login if not succeed then I show the error from left_side.php file. This Login Error Message I hide through
index.php. In case of wrong username and password its immidetietly show the error message but I want to
slidedown.I cant understand where the problem is?

Please help me.

——-index.php——–

[code=php]<?php session_start();
if ($_SESSION[‘id’]!=”ID”)
{session_destroy();}
?>
<html>
<head>

<?php
if ($_GET[‘status’]!=’loginFailed’)
{
?>
<script type=”text/javascript”>
function hide()
{
document.getElementById(“Login_message”).style.display=”None”;
}
window.onload=hide;
</script>
<?
}
?>

<script src=”js/jquery-1.3.2.min.js” type=”text/javascript”></script>

<script src=”js/jquerloginerror.js” type=”text/javascript”></script>

</head>

<body>
<div id=”wrap”>

<!——————— HEADER SECTION ———————>

<?php include “header.php”; ?>

<!——————— CONTENT SECTION ———————>

<div id=”content”>

include “left_side.php”;

</div><!– End of Content –>

<!——————— FOOTER SECTION ———————>

<?php include “footer.php”; ?>
</div><!– End of Wrap –>

</body>
</html>[/code]

—————–Left Side.php——————

[code=php] <div id=”left_side”>
<p><span class=”left_part1_head”>Sign in to web mail</span></p>

<form action=”login.php” method=”post”>

<label for=”user”>User</label><br />
<input type=”text” name=”userr” class=”userr” id=”userr” />
<p><span class=”left_part1_user”>(e.g johnsmith)</span></p>

<label for=”password”>Password</label><br />
<input type=”password” name=”password” class=”userr” />

<div id=”Login_message”>
<p>Error!</p>
<p>Invalid User Name and Password!</p>
</div>

<input type=”submit” name=”submit” id=”submit” value=” Sign in ” />

</form>

</div><!– End of Left Side –>[/code]

——Login.php——

[code=php]<?php session_start();

if( !isset($_POST[‘userr’]) || !isset($_POST[‘password’]) )
{
if (session_start()){session_destroy();}
header(“Location:index.php”);
exit();
}
else
{
include “connection.php”;
$user=strtolower(mysql_real_escape_string($_POST[‘userr’]));
$password=base64_encode(strrev(mysql_real_escape_string($_POST[‘password’])));

$query=”select * from tbladditionalinfo where ad_userlogin=’$user’ and ad_password=’$password'”;

if (!($result=mysql_query($query,$objdbConnect->con))) die(mysql_error());

if (mysql_num_rows($result))
{
while($row=mysql_fetch_array($result))
{

$_SESSION[‘id’]=”ID”;
$_SESSION[‘user’]=$user;
$_SESSION[‘password’]=$password;

$_SESSION[‘first_name’]=$row[‘ad_pname’];
$_SESSION[‘last_name’]=$row[‘ad_contactperson’];
}

header(“Location:logininformation.php”);
}
else
{
//if login failed this part will be active

header(“Location:index.php?status=loginFailed”);

}

}
?>[/code]

——jquerloginerror.js.js———-

[CODE]$(document).ready(function()
{

$(“#submit”).click(function()
{
$(“#Login_message”).slideDown(1500);
});

});[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 08.2010 — Forgot PHP tags[code=php]<div id="content">


<?php include "left_side.php";?>


</div><!-- End of Content -->
[/code]
×

Success!

Help @rashid100 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...