What is use of focus() function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 08:24 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 09:37 PM
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:
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
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 10:18 PM
Hello,
So it is the sys ID of particular record producer variables right?
Thank soo much for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 10:35 PM
Hi,
If your query is resolved, please mark the answer as correct and close this thread for others.
Regards,
Shloke
Regards,
Shloke