Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Client login code does not work on mobile or tablet


K-squared

Question

Site URL: https://www.proexpoteam.com/

I have used code on a page to create a client login area for our clients to be able to access their exhibit assets and show information.  The login page works as it’s supposed to on the desktop and goes to the password page when you type the 5 letter login, but it gives me an error when you type the same login on mobile or tablet. 

 

I can type in the website and url slug (5 letter login) directly and it will go to the password page just fine on mobile or tablet. The code I used is below. 

 

Let me know if you have any ideas. 

 

 

<div id="submitCodeWrapper">

  <input id="event-code-input" type="text" maxlength="5" class="box" autofocus />

  <input id="event-code-submit" class="myButton"  type="submit" value="Submit" disabled="disabled">

  <div id="feedback"></div>

</div>

<script>

  var eventCode = document.getElementById("event-code-input");

  var codeSubmit = document.getElementById("event-code-submit");

  

  eventCode.addEventListener("keyup", function () {

    if (eventCode.value.length < 5) {

      feedback.style.color = "red";

      feedback.textContent = 'Code is not long enough yet...';

      codeSubmit.disabled = true;

      }

    else if (eventCode.value.length = 5) {

      feedback.style.color = "green";

      feedback.textContent = 'Code is correct length';

      codeSubmit.disabled = false;

      }

  });    

  codeSubmit.addEventListener("click", function () {   

    location.href = '/' + eventCode.value; return false;

});

</script>

<style>

.myButton {

  height:50px;

  margin-left:10px;

  width: 145px;

  padding: 4px;

  background-color: #ff6B00;

  color: #fff;

  border-radius: 50px;   

  border: 0;

  letter-spacing: 1px;

  color: #fff;

}  

#event-code-input {

  height:48px;

  font-size: 20px;

  padding-left:10px;

}

#feedback {

  margin-top: 10px;

  color:red;

}

</style>

 

Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

Can you share link to page where you inserted above code? We can check easier

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...