« Blog Home

§ Even Faster Webpages

A couple of things to make pages a little faster than what I wrote in Faster webpages.

Read More ...

§ Fake placeholders

Fake placeholders...

Read More ...

§ Faster webpages

I was looking over my google webmaster tools the other day, and on the Site performance page there's a link to Page Speed, an add-on for Firefox.  (Actually, an add-on to Firebug, a Firefox add-on.)  I thought I'd take a look - maybe there'd be some good pointers.  Here's where that led...

I suppose I should also mention here yahoo's YSlow add-on for Firefox.  (Again, an add-on to Firebug, a Firefox add-on.)  For all I know, maybe using YSlow first would be more productive.  In my case, I discovered google's Page Speed first.

Read More ...

§ Don't AJAX an image!

Using AJAX is fine when you need it, but I've used AJAX to simply reload CAPTCHA images.  Boy, some people are dumb!  Me, in particular.

UPDATE:  I'm dumber than I thought...

Read More ...

§ Simpler adding & removing element classnames

Just use the javascript replace function...

Read More ...

§ Avoid email harvesting with javascript

I don't like to put real email addresses on web pages because "harvesters" look for them to add to their spam list.  However, harvesters probably don't run javascript before searching.

Read More ...

§ External links to new windows

Ok, there's lots of REALLY HEATED discussions about this topic all over the web.  I'm not looking for arguments; I'm just posting what I do here in this blog.

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 ...

§ 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


His idea managed to be both horribly unformed and far too complex - in itself quite an accomplishment, he supposed.
Martinez, The Sundering, Walter Jon Williams