cas.js javascript error in certain browser

13 views
Skip to first unread message

K S

unread,
Sep 18, 2017, 11:16:24 AM9/18/17
to CAS Community
I am getting Object does not support property or method  trim()  javascript error . Is there a workaround to this error in cas.js . the code is below .

function disableEmptyInputFormSubmission() {

$('#fm1 input[name="username"],[name="password"]').on("input", function (event) {
var enableSubmission = $('#fm1 input[name="username"]').val().trim() &&
$('#fm1 input[name="password"]').val().trim();

if (enableSubmission) {
$("#fm1 input[name=submit]").removeAttr('disabled');
event.stopPropagation();
} else {
$("#fm1 input[name=submit]").attr('disabled', 'true');
}
});

Uxío Prego

unread,
Sep 21, 2017, 11:07:47 AM9/21/17
to cas-...@apereo.org
Store what the program is trimming in local variables, log those variables and their types to console, and work around them.

Cheers,

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/e96c32d0-54b4-48de-8903-0e8ebcfed924%40apereo.org.
--
Uxío Prego

             

Madiva Soluciones
CL / SERRANO GALVACHE 56
BLOQUE ABEDUL PLANTA 4
28033 MADRID

+34 917 56 84 94
www.madiva.com
www.bbva.com

The activity of email inboxes can be systematically tracked by colleagues, business partners and third parties. Turn off automatic loading of images to hamper it.
Reply all
Reply to author
Forward
0 new messages