Skip to main content
1-Visitor
July 4, 2019
Question

Access elements (textbox,textarea) inside javascript function programmatically

  • July 4, 2019
  • 1 reply
  • 2677 views

i am in a situation where i use 40 to 50 fields (textbox,label) in a single mashup, currently for showing values in that fields i use the same 40 to 50 service, each for fields.This huge amount of services results in a slow page with massive lags. So am searching for a way - 

   there we can programmatically access all the fields(40 to 50 counts) in a single javascript service and manipulate it there itself, setting or getting text values of the fields like we do in native javascript(eg: that_specific_label.gettext())

1 reply

12-Amethyst
July 10, 2019

Hi @Ashikkasim,

I'm not sure, having 40-50 Server calls is the right way to go.

I'm not sure how you can interact with the widgets js code directly from the mashup, but even if you did you will still call 40-50 server calls...

 

My suggestion is to create a single/few Services that will create an InfoTable result with a data shape of your texts and labels.

Then you should bind the results of the info table data to the widgets. 

 

Another way to do some frontend manipulation is by using expressions or even create your own widget.

 

Thanks,

Avihu.

5-Regular Member
July 15, 2019

Hello Ashikkasim,

If @ashaban response has answered your question, please mark it as an Accepted Solution for the benefit of others who may have the same question in the future.

Thank you, and thank you for your contributions to the PTC Community.

abarki