Server to client side communication

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Server to client side communication

#1

Postby Segi » Mon Jun 29, 2015 11:19 pm

I have an image control that displays a loading animated gif. It is initially hidden. In the HTML entities of a submit button, I show this image control using css

Code: Select all

$('#LOADINGIMAGE').css('display','block');
I do this in the client side because of the asynchronous way that eBase runs server side code. If I do setHidden(false) in the server side script it never displays because once my code finishes it hides the image control and displays the table. Once my table is ready to be presented I want to hide the control but I don't want to call setHidden(true) on it because then eBase does not display it any more. Is there a way to have server side code call the client side to set the css display property on this control ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Jun 30, 2015 7:48 am

You can set the css style property directly from a server-side script and use this to change the display attribute of your image control from the server e.g.

Code: Select all

controls.IMAGECONTROL1.style = "display:none;";
Another way would be to have an HTML control containing your Javascript code then show/hide this.
0 x


Who is online

Users browsing this forum: No registered users and 20 guests