Does JS .focus work?

TT
Terry T
ADC Integrated Systems, Inc.

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? 

5 years ago
SOTI Snap
ANSWERS
J
JVMOD@SOTI
5 years ago

Hello Terry T,

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

MobiControl Version -

Agent Version -

Manufacturer -

OS Version - 

Regards,

TT
Terry T
5 years ago

Hello!

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

S
SMod@Soti
5 years ago

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

TT
Terry T
5 years ago

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. 

S
SMod@Soti
5 years ago

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,

Similar Discussions