Showing posts from December 14, 2008

IE will not render my dynamic table

And today I wasted an entire afternoon trying to figure out why IE will not render my dynamic table got from an AJAX call. And as usual all the other browsers were rendering the table without skipping a beat.
I stripped out everything till nothing was remaining in the table and still IE will not render the table. 
Finally I found out the culprit. I did not have a tbody tag. UGhhhh. 
Should I send a bill to Bill for all the wasted hours because of this inconsistent browser?

Freebie alert - ajax loader generator

I did not expect that such a thing will exist - but it does exist. You can customize your ajax loader circle here - .
Here are some samples ( which blogger is converting to png - so you will not be able to see the gif animation )

Javascript : Attaching to an event with a function that takes parameters

Thanks to IE refusing to play well on a dynamically loaded table with controls - I am learning new things.
Here is how to attach a function which takes parameters to a control.
document.getElementById('button').onclick=new Function("some_function('parameter')");
God bless IE.

another Gotcha - adding event to dynamically added control

This time the culprits were Chrome and IE.
The table I dynamically pulled had a select all button. But the onclick was never getting fired. The work around was quite simple. I had to attach the event to the control once again. Then the onclick event worked.
Attaching the event is quite simple. 
document.getElementById('button').onclick = functionName;

IE 7 does not show the table header - THEAD on AJAX call

I would have spent more than an hour breaking my head with IE. 
Problem : I have a table which is fetched using AJAX. Now this table has a thead with header contents and rendered fine in all the browsers except IE. 
My code looked something like this 

Solution :  There should be a TR within the THEAD. Now the header started showing fine after the ajax call. The funny thing is - IE rendered it fine when this table was part of the page. When I moved it to be rendered from an AJAXy call this problem surfaced. 
Now the code looks like this.

Server issues but I am sticking with my hosting provider.

It was a harrowing time yesterday. My virtual hosting provider had network issues and so ApartmentAdda was down for 1 hour 44 minutes. First time in it's short history that it has been unreachable. I discovered it after an hour and quickly changed the dns settings to point to a page that had please be patient - we are facing network issues message.
It seems they had a hardware fault in one of their main switches and the  hazaar virtual hosts became unaccessible. Wondering who the service provider is - it is
I always wanted to write about them - but let me do it now. Perhaps they are getting a bad rap everywhere because of the downtime they had and their 9999 something went for a toss because of yesterday's down time. But I will stick to them. They are good. 
Here is why : They are prompt and whoever I talked to is knowledgeable. Either they can call you ( yes I am in India and they use skype or something ), or you can chat with them - and they answer  you any time of t…

and I give Dravid Man of the Match award

The man-of-the-match award committee did not give Dravid the man of the match award - they are a bunch of fools anyway. But I confer the man of the match award to Rahul Dravid. 
No one deserves the award better than Dravid. He faced 19 balls and scored 4 runs ( see my earlier post about 5 opt repeated cliches - point no. 5 - I still have some cricket left ). After 19 balls he sacrificed his wicket so India can go and win the match.  He could have easily wasted 113 balls to score 5 runs - and then get out - so that the asking rate is impossible to achieve, and also the other batsman would have lost all interest in playing cricket. But he did not do such a thing. The noble soul sacrificed his wicket for a just cause. He deserves to be honoured.
Also he pleasantly surprised the poor crowd who had come to see a defeat or a draw. Man of the match always should be given to the ad model who is instrumental in shaping the victory - who else is responsible for paving the way for an India win…