onclick option is not showing in Extended Properties area
Application Type
Traditional Web
Service Studio Version
11.10.22 (Build 42083)

Hi,

I'm trying to call an javascript function in onclick event for the button, I didn't find onclick in the extended properties
Please suggest me am I missing some thing or do I need to enable any options.



Thanks.

mvp_badge
MVP
Solution

Hi Sandeep,

The Button widget already has the On Click property as highlighted below, which is a mandatory field, so why do you need the onClick event?

Other than that, you can also manually type in the onclick event to the Button widget extended property, as shown below. In this case, both the screen action along with the showMsg() will get executed.  

Could you describe us your use case a bit more, so that we can help you better :)


Kind regards,

Benjith Sam

Hello Benjith

Thanks for sharing the detailed answer. Just to confirm with Traditional... If we are calling JS Function with OnClick can we keep Validation Server or Should be Client? Or it doesn't matter? 


Many thanks in advance for helping. 

mvp_badge
MVP

Hi Manish,

You're welcome :)

As per my understanding of the mentioned case, the button gets registered with multiple onclick handlers, i.e. screen action & JS function call. Regardless of the Validation property value, both the handler will get executed on the button click.

I hope this helps!


Kind regards,

Benjith Sam

Thanks for the detailed explanation.

Hi @Sandeep K 

In Reactive Web App there's an OnClick property in a Button where you implement your event

But I believe that your application is in Traditional Web, so the appearance is as you mentioned, where you implement your behavior desired on Destination property, as in the image below.


I hope It helps you.

Best regards,


mvp_badge
MVP
Solution

Hi Sandeep,

The Button widget already has the On Click property as highlighted below, which is a mandatory field, so why do you need the onClick event?

Other than that, you can also manually type in the onclick event to the Button widget extended property, as shown below. In this case, both the screen action along with the showMsg() will get executed.  

Could you describe us your use case a bit more, so that we can help you better :)


Kind regards,

Benjith Sam

Hello Benjith

Thanks for sharing the detailed answer. Just to confirm with Traditional... If we are calling JS Function with OnClick can we keep Validation Server or Should be Client? Or it doesn't matter? 


Many thanks in advance for helping. 

mvp_badge
MVP

Hi Manish,

You're welcome :)

As per my understanding of the mentioned case, the button gets registered with multiple onclick handlers, i.e. screen action & JS function call. Regardless of the Validation property value, both the handler will get executed on the button click.

I hope this helps!


Kind regards,

Benjith Sam

Thanks for the detailed explanation.

Hi @Sandeep K 

In Reactive Web App there's an OnClick property in a Button where you implement your event

But I believe that your application is in Traditional Web, so the appearance is as you mentioned, where you implement your behavior desired on Destination property, as in the image below.


I hope It helps you.

Best regards,


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.