Can you explain your requirment more? What exectly you need? Do you need to run some JavaScript code periodically or any other mean between 8:00 AM to 4:00 pm? Do you wnat to run this based on server time of client time?
Thanks & Regards
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
Can you explain your requirment more? What exectly you need? Do you need to run some JavaScript code periodically or any other mean between 8:00 AM to 4:00 pm? Do you wnat to run this based on server time of client time?
hi friend
yes i want to run my javascript fn on server time pf client time
yes i want to run my javascript fn on server time pf client time
Read the server time in a javascript variable using<%=%> or add the server time to a hidden filed in the pageload event in the server. Use window.onload event in and add your javascript code inside a conditional block. In the condition block check whether
the time is within the specific time. If you want the code should execute only one time, you can add a flag in cookie.
Thanks & Regards
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
Marked as answer by BU XI - MSFT on May 07, 2012 07:42 AM
nazlin
Member
135 Points
173 Posts
run a javascript function automaticall in a aspx page
Apr 29, 2012 05:44 AM|LINK
hi dear,
how can i run a javascript function automaticall from 8:00 AM to 4:00 pm whith out press any button an my page.
please help me
what's your suggestion?
thanks
chiragtoad
Member
212 Points
51 Posts
Re: run a javascript function automaticall in a aspx page
Apr 29, 2012 05:57 AM|LINK
check this link this may help you out
http://www.w3schools.com/js/js_timing.asp
http://stackoverflow.com/questions/6531950/how-to-execute-async-task-repeatedly-after-fixed-time-intervals
Pince
Member
52 Points
18 Posts
Re: run a javascript function automaticall in a aspx page
Apr 30, 2012 09:22 AM|LINK
Refer this link
http://stackoverflow.com/questions/10374280/run-a-javascript-function-automaticall-in-a-aspx-page
asteranup
All-Star
30184 Points
4906 Posts
Re: run a javascript function automaticall in a aspx page
Apr 30, 2012 09:56 AM|LINK
Hi,
Can you explain your requirment more? What exectly you need? Do you need to run some JavaScript code periodically or any other mean between 8:00 AM to 4:00 pm? Do you wnat to run this based on server time of client time?
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
nazlin
Member
135 Points
173 Posts
Re: run a javascript function automaticall in a aspx page
Apr 30, 2012 05:51 PM|LINK
hi friend
yes i want to run my javascript fn on server time pf client time
BU XI - MSFT
All-Star
22367 Points
2704 Posts
Microsoft
Re: run a javascript function automaticall in a aspx page
May 02, 2012 03:44 AM|LINK
Hello
You may try setInterval method to call a javascript function periodically, https://developer.mozilla.org/en/DOM/window.setInterval
In that javascript function, you can make ajax calls to servers to perform some tasks.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
asteranup
All-Star
30184 Points
4906 Posts
Re: run a javascript function automaticall in a aspx page
May 02, 2012 05:57 AM|LINK
Hi,
Read the server time in a javascript variable using<%=%> or add the server time to a hidden filed in the pageload event in the server. Use window.onload event in and add your javascript code inside a conditional block. In the condition block check whether the time is within the specific time. If you want the code should execute only one time, you can add a flag in cookie.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog