self clearing text input fields with javascript

I found that I use a lot of input fields which need to display a simple message to the user like “type the molecular structure of didehydro-dimethylether onium cation” — and when they focus the box it needs to clear, and when they blur the box it needs to go back to that message. Theres [...]

More



Apocalypse 2.0 The day the web broke

Found this article on Digg, and just thinking about this makes me cringe. If what he’s saying is true, which it most likely is, then my life is about to become a big pile of hate. Can’t we all just get along?
Apocalypse 2.0 – the day the web broke by ZDNet’s Ryan Stewart — [...]

More



Wiki style auto link formatting through JS

This is a simple effect that looks pretty awesome and can definatly make your blogging life much easier. (how? because you will never have to type “target=_blank” again, thats how.)
Heres the JavaScript includes

src=”/jslib/prototype.js”

src=”ubrious.js?domain=blog.ubrio.us”

or

src=”ubrious.js?domain=<?=$_SERVER['SERVER_NAME']?>”

And the JavaScript itself

Event.observe(window, ‘load’, function()
{
domain = ”;
$A(document.getElementsByTagName(”script”)).findAll( function(s)
{
domain = s.src.match(/ubrious.js(?.*)?$/);
if(domain)
domain = domain[1].replace(/?domain=/, ”);
});
$A(document.getElementsByTagName(’a')).each(function(l)
{
if(l.target==”_blank” || !l.href.match(’/'+domain+’/') && !l.href.match(/^javascript/))
{
// attach if outside of your [...]

More