1298
Views
8
Comments
Call server side function using javascript 
Question
Hello All,

How to call server side method using javascript, after some time of interval?I am able to call javascript method after some interval, but how to call server side method?
2025-08-22 10-19-44
Pramod Jain
 
MVP
Keep a button on your page and hide it using display none , raise click event of the button from javascript or you can also try fake notify widget to achieve this.


Regards
-PJ-
2025-09-25 22-50-38
Hanno

Pramod Jain wrote:

Keep a button on your page and hide it using display none, raise click event of the button from javascript or you can also try fake notify widget to achieve this.


Regards
-PJ-

Just want to add that one needs to be vigilant here when hiding the button. Pramod has given the correct way to do this.

The wrong way: Setting the Display property to False will also hide the button, but make it unclickable from Javascript as the button is not actually rendered on the page.


2022-05-18 07-58-50
Pradip Chavhan
Hi,
Thanks for your valuable reply, but can you please provide screen shots or link then I can easily achieve it.
2023-02-10 19-42-59
João Melo
 
MVP
Pradip, You just need to put a jquery line like this in your settimeout closure: $(#' + MyButton.Id + ').click(); The screen action binded to your MyButton will do the server side magic.
2022-05-18 07-58-50
Pradip Chavhan
João Melo wrote:
Pradip, You just need to put a jquery line like this in your settimeout closure: $(#' + MyButton.Id + ').click(); The screen action binded to your MyButton will do the server side magic.
 Hi,
Where this property is located, can you please add screen shot so that i can get it more clearly. I am unable to get how and where to add that jquery line.
 
2025-08-22 10-19-44
Pramod Jain
 
MVP
Thats it...Thnx Joao.
2025-01-09 14-56-57
IQ78

hi Pradiv!

Given: JavaScript and Server Action:

SyntaxEditor Code Snippet

setInterval(mytime,15000);


Find: JavaScript to call that Server Action:

Cookbook:

1. Drag a button (CallMe) and set its Extended Property to:



2. Put the server action in the Destination propert: CallMe

3. Call the server action from Javascript (i simulate by clicking the OK Button):

and the javascript:


4. Try It!

NB. return false makes the server action of the OK button is NOT called.


regards,

bb



2025-08-22 10-19-44
Pramod Jain
 
MVP

This should work .

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