[HTML_AJAX-devel] html ajax presentation

Laurent Yaish laurenty at gmail.com
Sat Jul 8 17:28:24 PDT 2006


Hi Allan,

The first thing that I would change in the js code is the way it checks if
'menu' is an object. getElementById returns null for an element that cannot
be found, and typeof null is object, so this renders all the if
(typeof(menu) == 'object') useless...

I haven't had a chance to really go thru the code and figure out exactly
what's wrong in IE but I would start by changing those.

Laurent

On 7/7/06, Allan Hutchinson <allanh62 at hotmail.com> wrote:
>
> Hi Laurent,
> I have been trying to help a SitePoint forum member with the MenuExample.
> It
> seems there are bigger problems than short tags and case. I put a bunch of
> "alert - where am I, what's the var val"s in the js file.
> .......
> if( typeof(menu) == "object" )
> {
>      for( var key in menu.options )
>      {
> alert("empty func menu.options[" + key + "]");
>      menu.options[key] = null;
>      menu.remove(key);
>      }
> }
> .......
> Firefox gives key values of "item", "namedItem", and "sellectedIndex".
> But IE gives "language", and "scrollHeight" and then it errors.
> If you want to try out the page (with a lot of alerts) it's currently at
> www.mittineague.com/test/
> Thanks, Allan
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://bluga.net/pipermail/html_ajax-devel/attachments/20060708/a7e0c542/attachment.html


More information about the Html_ajax-devel mailing list