Archive for September, 2009

JavaScript’s window.onunload resolves css display issue in IE and Opera

Tuesday, September 29th, 2009

I noticed a rather odd issue in Internet Explorer (IE) and Opera, where by a HTML element whose visibility is toggled on and off (using a CSS class via JavaScript mouseover/out event listeners) stays visible when clicking the browsers BACK button.

Rather than reloading the page and thus rendering the element as hidden (until the user rolls their mouse over the relevant area to make the hidden element visible again), the element was visible immediately. I think this has something to do with how these browsers call the previous page’s content, maybe from some kind of cache? (if someone can enlighten me on why this happens in only these two browsers – Mozilla Firefox, Google Chrome and Apple Safari all worked fine – I would be grateful).

(more…)

WordPress jQuery ‘undefined’ Error

Sunday, September 27th, 2009

This is just a quick post on an issue I found while testing the open-source WordPress blogging software (www.wordpress.org).

It seems quite a few people over the years have asked for help (mainly on the WordPress forums) to fix a particular JavaScript error which causes their WordPress administration system to break, but it seems that after researching this issue myself (as I also was struck down by this JavaScript oddity) that there were NO useful answers or resolutions.

(more…)

How to add useful utility methods to JavaScript

Sunday, September 13th, 2009

If you find in your day to day JavaScript work that a particular method or function is missing from the core language you can always just add it in yourself by taking advantage of the prototypal nature of the JavaScript language and modifying an object’s hidden prototype property.

Every object has a prototype property which links to an empty object. By adding methods to this hidden object you can augment the original Function.

(more…)

Get a list of HTML elements by id

Sunday, September 13th, 2009

Here is a simple function which takes a list of id values and then grabs the relevant HTML elements from the page and returns them as an Array where you can then loop through the Array and do whatever you want with the results.

(more…)

Integral Art and Alex Grey

Sunday, September 6th, 2009
visioncrystal

'Vision Crystal' by Alex Grey

I’m a fan of the visionary artist Alex Grey (http://alexgrey.com/).

I came to know of Alex Grey through the music of TOOL (http://www.toolband.com/) and have since collected all his books, purchased his artwork and prints, donated to his project The Chapel Of Sacred Mirrors (http://www.cosm.org/) and am also in the midst of completing an epic back tattoo of his ‘Vision Crystal’ piece (http://www.twitpic.com/grbhp).

Alex Grey talks about the ‘Vision Crystal’ in his book “The Mission of Art“…

(more…)