ā10-18-2017 02:59 PM
Hello,
I need help with the jQuery or jscript with ISE 2.2, to populate and hide the login text box for a sponsored portal page. Users should only see the password box on the portal page.
This is the code I have right now, but currently stuck.
<script>
jQuery(window).load(function() {
jQuery("input[name='user.username']").val("LOGIN");
});
</script>
Thanks.
Solved! Go to Solution.
ā10-19-2017 10:44 AM
With the help of paul@berbee here was the missing code I needed to add to the optional content 2.
<script>
portalloginForm.elements["user.username"].value = 'UserName-test';
portalloginForm.elements["user.username"].style.visibility = 'hidden';
portalloginForm.elements["user.username"].type = 'hidden';
</script>
ā10-18-2017 03:17 PM
I don't know the jquery syntax but this works to hide password field and could be modified for username:
<script>
portalloginForm.elements["user.password"].value = '0';
portalloginForm.elements["user.password"].style.visibility = 'hidden';
portalloginForm.elements["user.password"].type = 'hidden';
</script>
What are you trying to accomplish by hiding the username?
ā10-19-2017 09:31 AM
HI Paul, its because there is no other way to create a simply password only with auto rotation with ISE, so have to hack it a little.
ā10-19-2017 09:58 AM
Ahh I figured you might be doing something like that. So using a normal hotspot portal with passcode and manually changing the passcode every month is not an option? You could also do an API, but that is probably overkill.
ā10-19-2017 10:36 AM
API is considered to custom for this build so we are pointing it to an external free radius with a bash script that updates a single user for password rotation. The other option requires budget that doesnt exist for the password/access code updates.
ā10-19-2017 10:42 AM
Makes sense. I am sure you tested this already, but because you are using an External RADIUS server in the authentication sequence the āguestā user will be treated as an Employee for Endpoint Identity Group mapping. So in the guest portal make sure to map the Employee use case to the desired endpoint identity group and use that in your rule structure.
Paul Haferman
Office- 920.996.3011
Cell- 920.284.9250
ā10-19-2017 11:12 AM
Not sure what you mean by that. I have had to set up an external Radius server and will have to use a Autho rule to point it that way.
Feel free to DM me.
ā10-19-2017 10:44 AM
With the help of paul@berbee here was the missing code I needed to add to the optional content 2.
<script>
portalloginForm.elements["user.username"].value = 'UserName-test';
portalloginForm.elements["user.username"].style.visibility = 'hidden';
portalloginForm.elements["user.username"].type = 'hidden';
</script>
ā08-28-2018 12:55 AM
Hi Jonathon ,
Just wanted to know if your script is still working as you expect and if there was a possibility to share the script that you put in Optional content 2 in the login form ?
Thanks
Regards
Marc
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide