« Blog Home

§ Helpful links

When I search google and find myself on the same page... again... I'm putting a link here!

Read More ...

§ Validating email addresses (it's impossible) (Rant Alert!)

Search google for "validate email address" and you'll get about 303,000 results.  I bet all of them are wrong...

Short version:

Why bother?  I'm probably going to enter "example@example.com" anyway.

Read More ...

§ Adding & removing element classnames

Ok, these are just dumb.  See Simpler adding & removing element classnames instead.

 

A couple of ways to change classnames of elements.

Read More ...

§ Table row hover highlight

A bit of javascript to highlight the table row under the cursor.

Read More ...

§ Handling url get string with javascript

Using javascript to handle url get string variables

Read More ...

§ Better tabbed interface

Tabbed interface using get string to set active tab.

Read More ...

§ Auto replace textareas with fckeditor

Simple function to replace any textarea with fckeditor.

Read More ...

§ Simpler validate form fields are filled in (no additional class names)

Makes sure something is entered in form fields.  If your form fields have classnames, don't use this one!

Read More ...

§ Validate form fields are filled in (additional class names)

Makes sure something is entered in form fields.  Uses regex to replace classnames so other classnames aren't affected.

Read More ...

§ Javascript function to add css

This javascript is a way to add an extra style node (css) into a page.

Read More ...

§ setInterval to stay logged in

Just a setInterval example to refresh a page.

Read More ...

§ Adding events to elements

For most elements, you can just do element.onclick = function_name.  But read on...

(Much better article available at Add and Remove Elements with JavaScript (reprise) from Dustin Diaz.)

Read More ...

§ Image tabbed interface controlling hidden divs

Tabbed interface using images for rounded tabs.  Gives decent results even if javascript and/or css are off.

Read More ...

§ Simple tabbed interface

Simple tabbed interface intended to go to different pages.

Read More ...

§ Send POST request from PHP

A way to send a POST request from PHP.

Read More ...

§ Use iframe contents to change iframe to ajax div

This php file, used as an iframe's content, will attempt to load javascript to the parent to replace the iframe with a div, then ajax its content to that div.

Read More ...

§ window.onload via double delegate function

This is the way I add javascript functions to the window.onload event.  As far as I've seen, you can load endless functions this way.

Lifted straight from Robert Hahn's blog:  http://blog.roberthahn.ca/articles/2007/02/02/how-to-use-window-onload-the-right-way

Thank you!  Bless you!  What a headache.

Read More ...

§ Adjust iframe height to contents

Some javascript in an iframe's content page can adjust the height of the iframe to its content.

Read More ...

« Blog Home


She stood up.  “Professional?  Ha!  My father used to say, you have to be able to tell a tracheotomist from a cutthroat.  Well, I can.”
Claire, Artifact,Gregory Benford