21-Mar-2006 Uncategorized

since I’m already geeking out

Normally I don’t talk about my programming, but I figured I’d bring up some stuff while I’m at it. I have two cool little JavaScript tricks that I came up with recently which I’d like to show you.
These are considerably different than the code I recently posted which I wrote in junior high for my TI 99/4A B.B.S. program. Ah, them were the good ol’ days when I could program during Health class.

My first trick code is only useful if you need to float a web page on another web page, but make it look like it’s really part of the same page. Confused yet? Check out my floating iframe code by clicking here. You can sorta tell that my site is floating inside a box on the page. Notice the white borders? It re-adjusts the height and width of the iframe dynamically whenever you go to another page. This trick only works on pages hosted on the same domain, although there is a registry edit you can make to allow it to work anywhere.

My second trick is for Internet Explorer only (although it will still sorta work in FireFox). It pops open the browser’s search frame and puts some code in there. The code borrows the same color scheme that your browser is using (thanks to CSS) so that it looks built in. That’s the simple explanation. You could put practically anything in there, but I think a menu of some sort kind of lends itself to the ”search companion” window.

Feel free to take my code and use it for your own purposes as long as you follow the GNU public license agreement. Otherwise, watch out for the lighting bolts.