Search

What the Quote?

"You're like Freulein Maria: you've gotten out of the habit."

Laura Tripcony

"We could do a lot to reduce the rate of construction accidents if we could just get those 5 year-olds with head-colds off those bulldozers."

Chad Schelfhout

"You make funny coding noises."

Laura Tripcony

« Get and Set: do you always need both? | Main| Idea Jam Press Release »

What the Quote?

Category domino javascript
I really, really, really like Ext. As fun as manual DOM scripting can be, sometimes it's nice to just let a framework work its magic... especially when that framework happens to be very well-written and ridiculously easy to use.

Although I'd like to believe that some of the little code nuggets I post here are of occasional use, the popular favorite portion of my site seems to be the random quote section. I've had several requests for a way to view all the quotes, not just a few at random. A while back, a friend of mine even envisioned expanding it to allow quotes to be submitted, and voted on, by anyone - similar, but on a smaller scale, to ideaExchange. He even registered WhatTheQuote.com for that very purpose. Well, I figure it's a shame such a fun domain name is fusting unused, and I'd been itching for an excuse to dig into the Ext 2.0 API anyway, so this is what I've been playing with for the last two hours. Yup, that's all it took. Ext rules. I added 4 images, 44 lines of JavaScript, 30 lines of LotusScript, and 3 lines of CSS... and Ext does everything else. Caveat: the submit stuff doesn't do anything yet... maybe tomorrow.

Something curious about all this: check out the source for that page. Notice anything strange? Specifically, don't web pages usually have a <body> tag? I was surprised to find that none of the major browsers (I.E., Firefox, Opera, Safari) care that it's missing. I guess sometimes all you need is the right head.

UPDATE: Quote submission works now. So does voting (double-click any quote to display a vote dialog). For some reason it doesn't work in I.E. Aren't browsers wonderful?

Comments

Gravatar Image1 - Looks very nice, Ext does rock! Emoticon

As for the body tag, you would be really amazed at some of the crazy things the browser will accept/do. Try adding a head { display: block; background-color:yellow; height:100px; } sometime Emoticon You can make the html element display as well and even add some margin around it. Oddly enough, whatever element that is outside of html inherits background color from the body element.

Gravatar Image2 - Doesn't look like double-clicking to open a quote works. Which means the one about Starbucks can't be read in it's entirety. Emoticon

Can't wait for the submit to work...

"You can always spot Java written by C-coders because it's littered with public void (blah, blah, blah) They're proceduretarded."

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Contact Me

Elsewhere

Assorted Linkage


Locations of visitors to this page