Divvy Tables
The more web savvy of you will be rolloing around in laughter at the thought of a divvy table because the two are completely different ways of implementing the same thing. Let me explain:
A table is just that. You define rows and columns and what goes in the columns, and then the web broswer does the rest.
A div is a containing rectangle in HTML. Pretty boring, except that you can put whatever you want inside the div and then position the div (and hence its contents) wherever you want on the page (or in another div even).
Divs are much more flexible than tables, render more consistently in all browsers than tables do, and are a much neater way to write your code. The problem is, PlasticBishop.com was written using tables for pretty much everything because, at the time, I didn't know any better. Now I'm paying the price for that because of all of this real time fun that I'm writing. Here's the problem:
I want to make the list of currently active games in the side menu dynamic, so when someone moves against you in a game that you're not viewing you still find out about it immediately. Unfortunately the menus are all written as tables which makes using Javascript to update them a failry complicated task. I'm now rewriting this menu using DIVs, and using Javascript to create one of them is as easy as pie. In fact, I've got it all working on my home tests now. Except for the bit that actually reads the new game information of course... Heh heh, can't have everything I guess.
A table is just that. You define rows and columns and what goes in the columns, and then the web broswer does the rest.
A div is a containing rectangle in HTML. Pretty boring, except that you can put whatever you want inside the div and then position the div (and hence its contents) wherever you want on the page (or in another div even).
Divs are much more flexible than tables, render more consistently in all browsers than tables do, and are a much neater way to write your code. The problem is, PlasticBishop.com was written using tables for pretty much everything because, at the time, I didn't know any better. Now I'm paying the price for that because of all of this real time fun that I'm writing. Here's the problem:
I want to make the list of currently active games in the side menu dynamic, so when someone moves against you in a game that you're not viewing you still find out about it immediately. Unfortunately the menus are all written as tables which makes using Javascript to update them a failry complicated task. I'm now rewriting this menu using DIVs, and using Javascript to create one of them is as easy as pie. In fact, I've got it all working on my home tests now. Except for the bit that actually reads the new game information of course... Heh heh, can't have everything I guess.

0 Comments:
Post a Comment
<< Home