Results 1 to 2 of 2
  1. #1
    jpatrick is offline Member
    Join Date
    Dec 2015
    Rep Power

    Default Java script for ADFS

    I really no nothing about coding or Java script so please forgive my ignorance. I've set up ADFS in our environment and everything works great. The problem is that we have two domains so a user will have to type or domain2\username.

    It was preferred if our users didn't have to put in a domain name so I started researching and found that I could edit this object.js file. Again, me knowing nothing about coding, I was able to get it to enter the domain name for one or the other. Then I was able to get it to check domain2 if it didn't find it in domain1 (I think) The problem is that I can't get it to REMOVE domain1 after it's done looking there. So it would look like this domain1\domin2\username and then error out.

    Does anyone know how I can get domain1 to be removed if a user isn't found there?

    if (typeof Login != 'undefined'){

    Login.submitLoginRequest = function () {

    var u = new InputUtil();

    var e = new LoginErrors();

    var userName = document.getElementById(Login.userNameInput);

    var userName2 = userName;

    var password = document.getElementById(Login.passwordInput);

    if (userName.value && !userName.value.match('[@\\\\]'))


    var userNameValue = 'domain1\\' + userName.value;

    document.forms['loginForm'].UserName.value = userNameValue;


    if (!this.errDisplay) {

    var userNameValue = 'domain2\\' + userName2.value;

    document.forms['loginForm'].UserName.value = userNameValue;

    if (!userName.value) {

    u.setError(userName, e.userNameFormatError);

    return false;}


  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Java script for ADFS

    Java is not the same as javascript. Try asking on a javascript forum.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Help me with this java script
    By DHgeocaching in forum New To Java
    Replies: 23
    Last Post: 07-08-2015, 11:01 AM
  2. Replies: 7
    Last Post: 02-21-2014, 02:41 PM
  3. Replies: 5
    Last Post: 05-24-2013, 07:11 AM
  4. Java script
    By kirtichopra2003 in forum Advanced Java
    Replies: 1
    Last Post: 12-04-2009, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts