Just to clarify...
By "hodge podge" I was referring to this chunk of code:
Code:
window.open(url);
createRequest();
var url = "http://192.168.1.66/bigview/bigviewserver.dll?sessid=" + jssessionId + "&doc=118" + "&x1=" + jsx1 + "&y1=" + jsy1 + "&x2=" + jsx2 + "&y2=" + jsy2 + "&sf=" + jszoom_factor;
window.open(url);
The red call to window.open is completely bogus. The variable url is empty at that point.
The blue call is similarly worthless. There is no reason to open a new window when you are making an Ajax call that is going to update the current window.
But more importantly, the whole function has to be wrong, I think. As written, it tries to make a call back to the Ajax server *EVERY TIME THE USER PANS THE IMAGE*. Even a move of one pixel would cause a hit on the server. Surely that's not what is wanted. Surely you should only go to the server when:
(1) The user changes the zoom level. Need new image at the new zoom level.
(2) The user pans the image to the limit of the panning. Need a new image that is centered on the panned-to point so that panning can continue.
Now, if you have the server power of google, you might go further than this. You might "anticipate" the user and load more "tiles" of image in the background. But that requires you to be indeed using a tiled image, and I don't see evidence that you are doing so (but I could be missing it).