K-squared Posted November 12, 2020 Posted November 12, 2020 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>
tuanphan Posted November 14, 2020 Posted November 14, 2020 Can you share link to page where you inserted above code? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
K-squared Posted November 16, 2020 Author Posted November 16, 2020 https://www.proexpoteam.com/login It seems to work fine on android phones. my only issue is Apple. I typed in: window.location.href = 'https://www.proexpoteam.com/miina'; return false; or this: location.href = 'https://www.proexpoteam.com/miina'; return false; and both worked, but I can't use it obviously because each client has a different event code.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.