Does JS .focus work?

Does JS .focus work?

Hello. 

In my  javascript on the OnLoad event is this one line of javascript code.

document.getElementById("TrailerID").focus();

 

Doesn't work worth peanuts.  
I only have one textfield named TrailerID on my form. Any ideas? 

 

  • 17 March 2020
  • SOTI Snap
  • 5 Answers
  • 0 Upvote
  • 4 Followers
  • 2.6K Views
    • 5 Answers
    • 0 Upvote
    • 4 Followers

5 Answers

Order By:   Standard | Newest | Votes
JVMOD@SOTI | posted this 24 March 2020

Hello Terry T,

 

Thank you for requesting response from SOTI Support staff, please provide more information -

MobiControl Version -

Agent Version -

Manufacturer -

OS Version - 

 

Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 0
  • 0
Terry T | posted this 24 March 2020

Hello!

Did I post in the wrong forum?  My question is for SOTI SNAP.  I'm in the cloud (adcisi.snap)

 

  • 0
  • 0
SMod@Soti | posted this 25 March 2020

Hey Terry,

 

Can you please make sure you change the textfiled ID to TrailerID as well:

After that, let's try this:

$("#TrailerID").focus();

 

Let me know if this works.

 

Thanks

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | soti.net |

 

  • 0
  • 0
Terry T | posted this 25 March 2020

Hello Support.

I did the following from above including the following:

$("#txtEnterTrailerID").focus();
$("txtEnterTrailerID").focus();
$('#txtEnterTrailerID').focus();
$('textarea').focus();
$("textarea").focus();
$('#textarea').focus();

 

And none of it works. 

  • 0
  • 0
SMod@Soti | posted this 14 April 2020

Hi Terry,

 

Just to clarify, textbox widget has a Name and ID as two separate properties, can you please verify that "#txtEnterTrailerID" is set as the ID of the textbox widget?

Thanks,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | soti.net |

 

  • 1
  • 0

Give us your feedback
Give us your feedback
Feedback