vendredi 6 mars 2020

Ajax call for simple form insertion doesn't appear on my system on the actual Web Server?

my main.js

function codershow(){
  $.ajax({
    url:"ajax.php?flag=codershow",
    type:"post",
    success:function(result){
      $(".sidenavs").html(result);
    }
  });
}

the ajax file has switch caller for the flag

case "codershow":
  $forms->codershow();
  break;

Forms php file

public function codershow(){

        echo "<form onsubmit='admincode();return false;'>
                <div class='input-group'>
                  <div class='input-group-prepend'>
                    <span class='input-group-text' id='basic-addon1'><img src='imgs/logos/code.png' style='width:20px;'></span>
                  </div>
                  <input id='scode' type='password' class='form-control' placeholder='ADMIN CODE' aria-label='Username' aria-describedby='basic-addon1'>
                </div>
                <button class='btn btn-primary' type='submit' style='cursor:pointer;float:right;margin-right:115px;'>PASS</button>
              </form>";
      }



Aucun commentaire:

Enregistrer un commentaire