Friday June 27, 2003
Added Google search to this theme The idea hit me like a cold beer pouring down my throat on a hot summer day. Crisp, clean and exciting. I've been wanting to add a search form to this theme, but I didn't want to add another tab, and putting it anywhere in the header would conflict with the background image. And then I spotted the perfect spot. Right under the categories, in the banner of the first entry on this page. With a little love from the DOM, you can now search this site using this theme and Google. Here's the relevant code that I added to the bottom of this theme.
<div id="search" style="display:none; margin-top: -17px; text-align: right">
<form id="searchForm" method="get" action="http://www.google.com/search"
onsubmit="return search()" style="margin: 0; padding: 0">
<input type="text" id="q" name="q" size="20" maxlength="255"
value="search this site" onclick="this.value=''" />
</div>
<script type="text/javascript">
// get the first entry shown in the page and append the
// hidden 'search' div from above
document.getElementById("entries")
.getElementsByTagName("div")[0]
.appendChild(document.getElementById("search"));
toggle("search");
function search() {
form = document.getElementById("searchForm");
if (form.q.value == "search this site" || form.q.value == "") {
alert("Please enter a search term to continue.");
form.q.focus();
return false;
} else {
form.q.value = form.q.value + " site:www.raibledesigns.com";
form.submit();
}
}
</script>
Boy oh boy does the DOM make it easy to do web sites! Seems to work in all the browsers I use regularly (IE/Moz on Win, Camino/Safari on Mac). It doesn't work in Opera 6, but does in Opera 7. Now back to that cold beer - I'm gettin' thirsty... Posted in Roller at Jun 27 2003, 04:57:58 PM MDT 8 Comments
A Remote Desktop using XUL From the xul-announce mailing list:
Randall Knutson has released the first prototype for
a remote desktop using XUL. Point your Mozilla XUL
browser (e.g. Firebird) @ http://robin.sourceforge.net
to call up a fresh desktop with a startup menu and
play XulMine, Mozteroids, Pagman, Snake, Xultris,
MozInvaders and more.
What is Robin? Here's the "official" blurb from the
sourceforge project site:
Remote Operating System Build in Netscape (Robin) is
a window manager using DHTML, Javascript, XUL and some
crazy hacks.
Full story @ http://sourceforge.net/projects/robin
This is pretty fricken cool... Posted in The Web at Jun 27 2003, 02:09:54 PM MDT Add a Comment
RE: J2SE 1.4.2 Released!
Thanks to Karl for tipping me off that JDK 1.4.2 has been released. [Download, Release Notes] Of course, I never would've known, except java.blogs told me. I downloaded, installed and changed my $JAVA_HOME to point to this sucker, then ran all my unit tests (flawlessly). It looks pretty damn good to me - just like an upgrade should be. Now where's J2EE 1.4?!
It doesn't look like Apple pulled off the simultaneous release it was hoping to. BTW, I've been doing a fair amount of development on my Mac lately with Eclipse 3.0 M1 - it's getting much, much better. Steve - if you release a 2 GHz PowerBook - I'll work overtime to buy that sucker.
Posted in Java
at Jun 27 2003, 10:00:20 AM MDT
1 Comment
Search This Site
Recent Entries
- New Passport in 9 Days
- EhCache Project Busy this Summer
- Spontaneous Stuff Weekend
- Awesome Birthday Present: A Kegerator
- Maven Plugin for Running Integration Tests against Multiple Containers
- Presenting Web Frameworks of the Future Tomorrow in Denver
- My OSCON Aftermath
- OSCON 2008 Wrapup
- [OSCON 2008] Even Faster Web Sites by Steve Souders
- [OSCON 2008] CSS for High Performance JavaScript UI by Gavin Doughtie