Jump to content

Client login code does not work on mobile or tablet

Recommended Posts

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>



  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;




.myButton {



  width: 145px;

  padding: 4px;

  background-color: #ff6B00;

  color: #fff;

  border-radius: 50px;   

  border: 0;

  letter-spacing: 1px;

  color: #fff;


#event-code-input {


  font-size: 20px;



#feedback {

  margin-top: 10px;





Link to comment
  • Replies 2
  • Views 471
  • Created
  • Last Reply


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.