Wednesday, October 18, 2006

uppin' my geekhood

the last few days i've been trying to get someone else's code do what i want. and what i want is: when you type in a certain character into an input field, a graphic somewhere else on the page changes becomes somewhat transparent.

i knew this would a) be a smidge complicated and b) require both javascript and css. so i was pretty anxious about it because i hate javascript.

anyway, today i gave up on the home-grown code (which was similar to what i needed) and looked on Ye Olde Internet. lo and behold! i found similar code that actually worked! it just changed *something* on the page, mind you. i still had to figure out the whole opacity thing. because opacity is not an officially recognized css property…yet. take that!

of course that means, the solution takes 3 lines instead of 1, but so be it.

but voila! presto! it's ALIVE!!!

now i have to write the whole algorithm -- when blah, show blah (and also do blah, blah, and blah) for the various conditions this work has to cover -- and since i love js so much, that part will be a joy too. but oh, the really reeeeeally hard part is over (crosses fingers) and for that, i am very, very happy. and pleased with myself. :-)

2 comments:

Jennie said...

Doesn't YOI code rock? I was supposed to write some code to parse typed-in fractions, and I thought: surely someone has done this before me. And voila, it was so. A few tweaks here and there, removing Windoze-only code here and here, and... done!

heather said...

oh, yes. i love YOI.