- "UTF-8">
- "viewport" content="width=device-width" />
Welcome to Apna Padosi - Admin - 'stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css'>
- "stylesheet" href="/css/style.css">
- class="login-form">
ApnaPadosi Login
class="form-group">- class="form-control" id="txtUserName" name="txtUserName" onkeyup="removeBlankValidation(this)" placeholder="User Name" type="text" value="" />
- class="fa fa-user">
class="form-group log-status">- class="form-control" id="txtPassword" name="txtPassword" onkeyup="removeBlankValidation(this)" placeholder="Password" type="password" value="" />
- class="fa fa-lock">
- class="alert" id="errormsg">Invalid Credentials
- class="link" href="#">Lost your password?
- type="button" class="log-btn" onclick="login_click()">Log in
- custom script
- function login_click() {
- //if (document.getElementById("#txtUserName") == null) {
- // alert('ss');
- //}
- //document.getElementById("#txtUserName").removeAttribute('style');
- //document.getElementById("#txtPassword").removeAttribute('style');
- if ($('#txtUserName').val() == "") {
- document.getElementById("txtUserName").style.borderColor = "red";
- return;
- }
- if ($('#txtPassword').val() == "") {
- document.getElementById("txtPassword").style.borderColor = "red";
- return;
- }
- var UserName = $('#txtUserName').val();
- var Password = $('#txtPassword').val();
- $.ajax({
- url: "/Login/AuthenticateLogin",
- type: "POST",
- data: {
- encuname: UserName,
- encpwd: Password
- },
- cache: false,
- async: true,
- dataType: "json",
- success: function (data) {
- if (data.Success) {
- window.location.href = "/Home/Index";
- }
- else {
- document.getElementById("#txtPassword").value = "";
- $('.alert').fadeIn(500);
- setTimeout("$('.alert').fadeOut(1500);", 3000);
- }
- },
- error: function () {
- document.getElementById("#txtPassword").value = "";
- $('.alert').fadeIn(500);
- setTimeout("$('.alert').fadeOut(1500);", 3000);
- }
- });
- }
- function removeBlankValidation(txtBox) {
- if (txtBox.value != "") {
- txtBox.removeAttribute('style');
- }
- }
Loading
Jignesh KumarPosted Jun 30, 2020, 10:28 PM