Announcements
Im trying to run some custom JS code to target the 'Reset Password' page (which we can't access like the Sign In page) to customize its styling.
I've already done this in the past to target the Sign In page - and that's never been an issue and has worked well.
So my process, create new JS file, create new Web File in Portal Management (configure everything the same as the Signin JS file except obviously the name. Upload the JS file to the note.
This is the JS Code:
$(document).ready(function () {
if(window.location.href.includes("ResetPassword")) {
alert("Reset your Password! ");
} else {
alert("URL: " + window.location.href);
}
});
I then clear server cache (and browser cache to be on safe side), go to the login page of the portal. In browser debug i can see JS code, but its not executing (if though it has else statement on the if)
I then go to the Reset Password page (via link in email which i triggered), the JS code is present (like with the login page) but it would also appear to not be triggered as no JS alerts are appearing
As a side thing - i did notice that the JS code i did awhile back for the Login Page (added thru same process) appears 'differently' within the code - in that appears encapsulated within these DIV's
I also note - i added an Alert statement within the Login Page code, but it appears the system doesn't update from the old JS file.
I also thought id test something different - i added some <script> tags into the HTML of the navbar (with an alert). after reloading page (and clearing cache) the JS code is visible, but once again no JS code is executing.
Can anyone offer any ideas?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156