Is there a reliable cross-browser way to detect that a tab has focus.  The scenario is that we have an application that polls regularly for stock prices, and if the page doesn't have focus we could stop the polling and save everyone the traffic...
What is best practise for polling server with JavaScript for application that needs to refresh data very rapidly? I'm using jQuery for front-end and Java Spring Framework for backend.  Example of refreshed data could be list of items that are g...
I'm developing a web app where a user can request a service and a provider will be available to respond to him. So, When a user requests for some sort of service, our application will send a notification to the provider (asking him to respond to...
I'm a bit green, so please bear with me.  I need to poll a SharePoint webservice until it returns a value. I believe that I have formatted my code incorrectly. If there is a pre-existing thread that addresses this, please point me to it; my relat...
I have an ActiveX object (who source code I have) running in a browser (IE). The ActiveX object has a UI, which raises events. I want to respond to those events in the browser.  I don't want to invoke JavaScript functions from the ActiveX object...
I’m trying to keep a Backbone.js Collection up-to-date with what’s happening on the server.  My code is similar to the following:  var Comment = Backbone.Model.extend({}); var CommentCollection = Backbone.Collection.extend({     model: Comment })...
I need to find a way to update a web App implemented with backbone.  The use case will be the following: I have several Views, and each View, or maybe model/collection related to this view, needs to make different polling request to the server at dif...
I'm trying to implement a WebSocket with a fallback to polling. If the WebSocket connection succeeds, readyState becomes 1, but if it fails, readyState is 3, and I should begin polling.  I tried something like this:  var socket = new WebSocket(ur...
I am trying to JSON.parse the array "data." I need to be able to pass the array as the root.  {   "data": [     {       "type": "name",       "id": "123"     }   ] }   The response should look like this...
I need to poll an image using javascript and need to perform an action once the image is found at its position. This is the code I have written for this task.  /*----Image handling script starts here----*/ var beacon = new Image();  beacon.onload = f...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.