Widget Visibility Affects Scripts Execution

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi,

When I set Widget visibility to false, its scripts can not be¬†executed. I am using widget for getting and writing some data to localstorage. When I am creating a component like as in winform I am inserting a widget to component and then when I used the component, widget scripts aren’t executed too.

Thank you.

  • You must to post comments
0
0

To return a value from javascript to the server you have to either 1) send an event, or 2) call a server method marked with [WebMethod].

Look at the source code of the geolocation extension to see how we did it there, or use the attached local storage component sample.

  • You must to post comments
0
0

Thats right I can use call and eval functions but how could I get result value of executed script. ¬†for example localStorage.getItem(“imei”) .

  • You must to post comments
0
0

Hi Adil,

That’s correct. When you create a Wisej control, it is not rendered on the client until the first time it is made visible. The reason is that many apps we worked with have a lot of controls in tab pages, or in hidden panels that don’t need to be created on the client until later on and sometimes never. The control is fully created on the server though.

You can force it by calling CreateControl().

Also, you don’t need a control to execute JavaScript. You can use Application.Call() and Application.Eval() at any time.

Best,

Luca

  • You must to post comments
Showing 3 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json