locked
Add Screen Server effect with Javascript

    Question

  • Hi All,

    I'm not a master in javascript . I'm working on project that use winjs,

    In this case there is a image on the screen. I want to change that image in to another image if there is nothing happening on the screen within 2 min's. ( Same as have a screen saver after 2 min's)

    Ho can I do it with javascript.

    Saturday, October 19, 2013 1:10 PM

Answers

  • Hi PrabathSl,

    Take a look at this one: http://www.w3schools.com/js/js_timing.asp. There is no 

    You could do it like this: while a event is fired for instance a mouse click, reset the timer by clearInterval() and setInterval(), set the milliseconds as 2 mins. 

    To set a listener for mouse movement is also necessary, you have to consider all the actions that may happen on the screen, basically they are mouse and keyboard.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by PrabathM Sunday, October 20, 2013 4:59 AM
    Sunday, October 20, 2013 2:12 AM
    Moderator