JavaScript: Two-Dimensional Arrays and other Goodies

18421 Users read it.
by Tom Dell'Aringa
This week I’m going to give you a few tricks of the trade to use involving three things: Two dimensional arrays, using window.onload with an anonymous function and using the DOM to build a new SELECT form element. Sound obscure? I've used … er, I mean a friend of mine has used these techniques for loading advertising banners , and using a script to randomly select one of the array items in the first column, which is the banner, then grabs the associated link from the second column. Anything along those lines it would be great for.
User Rating (2 votes)
$3.39 USD Support

Technologies:JavaScript
Number Of Pages:7

Tom Dell'Aringa

Tom got his start in web development in the winter of 1995 when his boss threw an HTML book in his direction stating "we should learn about this world wide web thing." Since then he has worked at dot.com era start-ups with no real business model, web integrator Scient, and as a freelance and contracting developer. He is currently an Interaction Designer for ServiceMaster.

Experienced in HTML, JavaScript, and CSS as well as server-side scripting languages, he has worked on everything from simple brochure sites to enterprise level portals.

It was during one of these large projects that he finally got fed up with the "IE only" mentality of coding. Additionally, even large corporations seemed unaware of the benefits of separating style from content and still produced bloated, non-standard code. In response to this, and a corresponding discussion on Evolt's thelist (http://evolt.org), he founded MACCAWS (http://www.MACCAWS.org) in late 2002.

Lately part of his role on teams involves explaining to developers what LABEL tags are, that they shouldn't build layouts with tables nested ten levels deep, showing them alternatives to using 127 spacer gifs per page, proving the benefits of a global stylesheet and defining DOCTYPEs and how to use them.

He realized the dot.com era was over when his paychecks started bouncing right after the big welcome party he had been flown to in San Francisco. He currently resides in the Midwest with his wife and two children. He plays guitar and even recorded a demo CD with his band(http://www.garageband.com/artist/thestand). Constantly scouring Ebay and garage sales for Charlie Brown and Snoopy paperbacks, he is finding it very hard to find the Peanuts Parade versions...anyone..?

See All Postings From Tom Dell'Aringa >>

Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency