Clarity Service Management

Expand all | Collapse all

Focus using getelementbyid

  • 1.  Focus using getelementbyid

    Posted 06-16-2016 11:03 AM

    Hi,

     

    I'm trying to chang the focus to a tab upon selection of a radio button in the system form.

     

    ex: if User select the "change cost allocation" then focus should change to second tab/filed in this tab(change cost allocation).

     

    I have tried with document.getelementbyid(cc).focus()( //cc is the _id value for "cost center for project") once user select the radio button.

     

    anyone tried to use the getelementbyid in catalog??

     

     

    Regards,

    Sharath



  • 2.  Re: Focus using getelementbyid

    Posted 07-04-2016 02:21 AM

    To select a field on a certain tab, you first need to show the tab.

     

    So before you set the focus to the cc field, you need to make sure the tab is the selected tab.

    To do this, you need to trigger a click on the title of the tab.

    Make sure you know the ID of the link in that title and before you set the focus to the cc field, add a line similar to this one:

     

        document.getElementById('accrdnHyprlnk5').click();

    In this example: accrdnHyperlnk5 is the ID of the link in the title of the 5th tab.

    In this case, where you only have 2 tabs, you're id will probably be accrdnHyprlnk2, but be sure to check this.



  • 3.  Re: Focus using getelementbyid

    Posted 07-05-2016 04:48 PM

    Hi sharamateti - Did jeroen.custers 's response help answer your question? If so please mark as Correct Answer. Thanks!