Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Sanatan

Member
Registered:
Posts: 31
Reply with quote  #1 

Hi, I am trying to assign a value to a Label caption on click on a button. The button click performs a Server side action and will return some value which needs to be assigned to Label. Is there a way to do this?

0
Pete

Senior Veteran
Registered:
Posts: 315
Reply with quote  #2 
You can only change the caption of a label via clientside script:
So you need to write the return of the server side script into a (hidden) textbox and then set this return value via client side script into the labels caption.

__________________
If you want the job done right, hire a professional.
0
Sanatan

Member
Registered:
Posts: 31
Reply with quote  #3 
Hi Pete, actually I am trying the stated approach as below.

1. Currently returning the SS Return value to a Customvar assigned to a hidden text field.
2. The above text field has 'has dependents' property checked.
2. Added a <div tag..> for the label caption to make it dynamic.
3. Trying to assign the value from the above hidden text field to the <div> tag's innerhtml attribute in client side script.

I can see the hidden text field has the value assigned to it on click on the button, but the label not getting its dynamic caption set.

I guess the reason it is not working because the when the SS is returning the value, the client side script no longer gets called. Is there another workaround for this?
0
sleclerc

Avatar / Picture

Senior Veteran
Registered:
Posts: 365
Reply with quote  #4 

You might need to try using the "window.setTimeout" command to call your methods which reassigns the caption's value.  The last time I tried this the client-side script was firing before the server-side script had completed reloading the variable I needed.


__________________
Scott

US Navy Seals --> "The only easy day was yesterday"
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!