Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  How to (question without any answer) simulate key pressed on login with SampleLogin.zip

    Posted Fri September 02, 2022 09:09 AM
    Hi,

    With the SampleLogin.zip extension, I would like to be able to press "Enter" from the password field then be able to login without the Connexion button.


    I am pretty sure I'm missing a quite simple code, any help would be appreciated!

    Best regards,

    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: How to (question without any answer) simulate key pressed on login with SampleLogin.zip
    Best Answer

    Posted Fri September 02, 2022 11:53 AM
    Modify the SampleLoginView.js, add this after the loginBtn.onclick function

    root.getElementsByClassName('sample.password')[0].onkeydown = (e)=>{if(e.keyCode=='13') loginBtn.click()}




    ------------------------------
    Paul Mendelson
    ------------------------------



  • 3.  RE: How to (question without any answer) simulate key pressed on login with SampleLogin.zip

    Posted Mon September 05, 2022 03:51 AM
    Hi Paul,

    You saved my day! Thank you very much for your help.

    Best regards,

    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    ------------------------------