Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
03-24-2009, 09:45 AM #1
- Join Date
- Mar 2009
- Thanked 0 Times in 0 Posts
script loads twice on using the request.send(null) with the document[Image].url
XmlHttprequest object to prevent cancelling of the first request when the second request comes.
but the problem now is that the handler is called twice as the image url also calls the handler and the Xmlhttprequest object.send also calls it. how can I avoid this and get the image.
here with given my coding also.
var url="../UserControl/ImageHandler.ashx?Name=" + CameraName+ "&lq=" + Math.random();
document.getElementById('CamImage').src = url ;
document.getElementById('CamImage').src = url;
if(irequest.readyState == 4 && irequest.status == 200)
s=setTimeout("GetCameraImage('" + CameraName + "','" + interval + "')",interval);
here irequest is the XMLhttprequest object.
the script was used in c#.net