Telegram_2019-10-23T16

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2019 > 10 > 23 >

Telegram_2019-10-23T16

Telegram link

 

2019-10-23T16:00:21

 

In the Scripts property of the button?

 


 

Telegram link

 

2019-10-23T16:02:04

 

you can use the JavaScript of the form to declare this function

 


 

Telegram link

 

2019-10-23T16:04:03

 

and the function

 

CallSomeWeirdCodeInSome3rdParyJavaScriptLibrary();

 

is provided by you (this one does the other stuff that you need).

 

It can be inside a JS file, it can be declared in some other JS library, or it can also be provided by your in your IWForm's JavaScript property (I don't recommend this if this needs to be changed by some external web designer, without rebuilding the application)

 


 

Telegram link

 

2019-10-23T16:06:21

 

this way you decouple your server code and your JavaScript code. You just have to define a protocol. The protocol in my example is function

 

CallSomeWeirdCodeInSome3rdParyJavaScriptLibrary();

 


 

Telegram link

 

2019-10-23T16:06:49

 

Someone provides this function to do whatever you want, from on the browser side. Your only obligation is to call it when the button is clicked.

 


 

Telegram link

 

2019-10-23T16:06:53

 

that's how it should be done

 


 

Telegram link

 

2019-10-23T16:06:54

 

IMO

 


 

Telegram link

 

2019-10-23T16:07:41

 

the JavaScript doesn't need to know that your button is named Button1 or MyFrame_Button1

 


 

Telegram link

 

2019-10-23T16:07:46

 

that's the point

 


 

Telegram link

 

2019-10-23T16:08:13

 

It just needs to implement a function which needs to be called with the appropriate parameters. That's how you build a protocol

 


 

Telegram link

 

2019-10-23T16:32:14

 

Ok, sounds good. But I still don't understant how can I add a \question\ before button click in this way. Sorry here it's late...

 


 

Telegram link

 

2019-10-23T16:32:33

 

Small example?

 


 

Telegram link

 

2019-10-23T16:33:47

 

the question doesn't go in the button click

 


 

Telegram link

 

2019-10-23T16:33:54

 

it goes into the other function

 


 

Telegram link

 

2019-10-23T16:34:38

 

so the other function is an ajax callback

 


 

Telegram link

 

2019-10-23T16:35:33

 

to create an example I need to know what you are doing there. I have no idea

 


 

Telegram link

 

2019-10-23T16:35:38

 

no it is not

 


 

Telegram link

 

2019-10-23T16:35:45

 

the other function is a javaScript function

 


 

Telegram link

 

2019-10-23T16:49:44

 

type: mention @sonjli You use templates?