[thelist] RE: DHTML Test and Critique

Bernardo Escalona escalonab at gmail.com
Fri Mar 18 11:01:08 CST 2005


Didn't take a look at the code but I do have a suggestion
functionality-wise. Would be nice if it worked by clicking on the '+'
and '-' icons aswell as the actual test. My first instinct was to
click on the + icons to see the sub-options and i was about to think
that it didnt work until i tried clicking on the text.

> I was wondering if anyone could test and critique a collapsible-menu script
> I wrote for a client's site map:
> http://www.tonygrimes.com/collapsible_menu.html
> It's inspired by Dave Lindquist's menus:
> http://www.gazingus.org/html/menuExpandable.html
> Hopefully, it degrades gracefully. I've only tested Safari/Mac,
> Firefox1/Netscape7/Mac IE5/Mac and IE6/PC.
> I'm not really familiar with Javascript and browser compatibility issues (I
> come from a PHP background) so I'm open to suggestions on how to improve it.
> I'd especially like to hear ideas on how to cut down code size, easier ways
> to do manipulate the DOM, etc.
> Some issues I've found so far:
> - The "show/hide all" links don't work in Safari. Can't figure out why.
> - the plus/minus list images don't initially show in Safari and Mozilla
> (Mac), or they don't draw correctly. Maybe I should declare the styles
> explicitly instead of changing the class name?
> - My use of splice() probably excludes some modern-ish browsers (IE5/PC?).
> Is there a better way of removing elements from an array.
> - Not really an issue, but I chose to use firstChild instead of innerHTML
> when copying the h3 content into a link. Is there a DOM-friendly way to copy
> all child/grandchild nodes into a new element? If not, I think I'll go with
> innerHTML eventually.
> - Question: does Javascript have an inArray() method like PHP's in_array()?
> I just made my own for now.
> Any input would be greatly appreciated.
> Tony

Bernardo Escalona Espinosa
tel: 56 22 85 23
cel: 55 18 56 74 73

More information about the thelist mailing list