cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Set focus on textbox

DanZ
11-Garnet

Set focus on textbox

Hi,

is it possible in ThingWorx 8.5.x and 9 to force focus on a specific element (like a textbox) in a mashup during runtime? I've seen solutions in older posts with jQuery which are no longer working.

Is there any way to achive this in newer Thingworx versions?

1 ACCEPTED SOLUTION

Accepted Solutions


Hello @DanZ,

 

You need to develop a custom widget where you place manually the focus to an element.

You can follow example at developer portal or at the Help Center page section Creating Customized ThingWorx Widgets

View solution in original post

5 REPLIES 5
slangley
23-Emerald I
(To:DanZ)

Hi @DanZ.

 

Can you point out the older posts that you're referring to? This will help us gain a better understanding of your requirement.  

 

Regards.

 

--Sharon

DanZ
11-Garnet
(To:slangley)

Certainly. The accepted solution in this case isn't working anymore: https://community.ptc.com/t5/ThingWorx-Developers/Force-focus-to-a-textbox/td-p/501391

I simply want to set focus to an element (like a textbox) after an event (i.e. ButtonClicked) is triggered.

 

EDIT: There are even cases where it is mentioned that jQuery isn't working anymore for this use case.

https://www.ptc.com/en/support/article/CS314721

https://www.ptc.com/en/support/article/CS304107

 

Is there any alternative?


Hello @DanZ,

 

You need to develop a custom widget where you place manually the focus to an element.

You can follow example at developer portal or at the Help Center page section Creating Customized ThingWorx Widgets

View solution in original post

Do you mean a customized textbox widget that have the function to force focus on itself? Or a separate widget that could set focus on any arbitrary element in the mashup?

 

I'm asking because I'm not sure if the second option is even possible.

Hello @DanZ,

 

Yes, a customized textbox widget that have the function to force focus on itself.

Announcements