javascript - Retain in the same page and do JS operations -


my file structure

  front-page       homepage.html       lib         .js          .php 

i send user information server , doing server side validation. if server side validation fails, want load html page , open log in window if email exists. have done following

     if(isset($_post['submit']) && $_post['email']!='')     {          $email= $_post['email'];       $sql1 = "select * users emailid = '$email'";       $result1 = mysqli_query($connection,$sql1) or die("oops");       if (mysqli_num_rows($result1) > 0)      {         //echo "this email used.";         //write code go register window         //header('location: ../homepage.html');         echo '<script type="text/javascript">                 console.log("cdsafcds");                 //jquery.noconflict();                 $(".login_links_login").trigger("click");                 </script>';      }     } 

i don't see errors , isnot triggering click too. don't have restrications. please provide me best way these kinda stuff. checked few sites loads separate page if php call fails. want know why can't in same page if so.

html:

<!----head>   <script type="text/javascript" src="lib/jquery-2.1.3.min.js"></script>   <script type="text/javascript" src="lib/jquery-validate.min.js"></script>   <script type="text/javascript" src="lib/homepage.js"> </script>   <link rel="stylesheet" type="text/css" href="lib/homepage.css" /> </head!--------->  <form method="post" action="lib/login_validate.php" class="logindiv right" id="loginform">   content goes here </form>    submit click: handled jquery 

please let me if data further needed


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -