What is use of focus() function

Rama Rao
Tera Contributor

Hello,

Can anyone please explain what is the use of focus()? and also can you please look into the below code

Code :

function onLoad() {
var a = $('IO:d0cc39e2d7532100a9bd1e173e24d489');
if (a)
a.focus();
}

Actually, this was created long back but I did not understand what is the use of this code. if it is not required, Can I deactivate this script?

7 REPLIES 7

This line means, open the Catalog form where this script is written in a browser and then Press F12 to open the inspection window as shown below:

IO:d0cc39e2d7532100a9bd1e173e24d489 --> This is an element if for one of the variable or element on the form as shown below:

find_real_file.png

In my screenshot above this is an element id of the text box highlighted in Red. Similarly you need to click on F12 AND then find which element ID has been hard coded here in your instance.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hello,

So it is the sys ID of particular record producer variables right?

Thank soo much for your help

shloke04
Kilo Patron

Hi,

If your query is resolved, please mark the answer as correct and close this thread for others.


Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke