Wednesday, 15 September 2010

Cross browser woes

This morning and this afternoon I spent most of my time refreshing IE6, making a small change in my code, then refreshing IE6 again. I was trying to find out why the info windows in my google map would sometimes get their parts splattered all over the map.

There was also something else strange in IE6. In my script, it fires off an AJAX request, then displays an info window saying 'loading' while it waits for the AJAX response. When the response is received, this is processed by a callback function that then updates the info window with the actual content. But in IE6 the info window saying 'loading' would never be displayed, it would just be displayed when the AJAX callback function had updated its contents.

I tried putting the AJAX request in a timeout and also doing an alert straight after the AJAX request, and it did appear that the request was asynchronous. It was just the info window wouldn't show up until the AJAX callback had finished for some reason.

It will be interesting to see what happens when it is on the live website instead of just my local dev environment.

In the evening I spent most of my time trying to figure out how to get the page and window heights using javascript. There's a lot of info on the net about how to do this, but I didn't find any that worked for getting the page height. Using the developer tools in Safari, I could see that both the html and body elements were smaller than the actual page height. I'll probably carry on working on that tomorrow.

The weather today started off sunny but very cold and windy. Then throughout the morning it became overcast, and rained a bit in the afternoon and evening.

No comments: