www.webdeveloper.com
Results 1 to 2 of 2

Thread: Jquery slidedown function problem

  1. #1
    Join Date
    Jan 2010
    Posts
    41

    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--------

    PHP Code:
    <?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>

    -----------------Left Side.php------------------

    PHP Code:
     <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 --> 



    ------Login.php------

    PHP Code:
    <?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");
               
               }

        }
    ?>
    ------jquerloginerror.js.js----------

    Code:
    $(document).ready(function()
    {
    	
        $("#submit").click(function()
        {
    	$("#Login_message").slideDown(1500);
        });
    
    });

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Forgot PHP tags
    PHP Code:
    <div id="content">

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


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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles