Board Logo

Firefox issue
the_new_mr - 12/9/2010 at 12:25 PM

Hello.

First of all, thank you for your Tigra menu system.

I am having problems getting it to work in Firefox.

I have Firebug installed by the way.

I am having trouble with the following statements:

Code:
this.o_showtimer = setTimeout('A_MENUS['+ this.n_id +'].expand(' + n_id + ');',
o_item.getprop('expd_delay'));


and

Code:
this.o_hidetimer = setTimeout('A_MENUS['+ this.n_id +'].collapse();',

o_item.getprop('hide_delay'));


I tried placing the code for the first argument into separate functions and call these functions as the first argument to setTimeout like this:

Code:
this.o_showtimer = setTimeout( expandItem(this.n_id, n_id),
o_item.getprop('expd_delay'));


However, this didn't work.

Firebug produced the following error message: "useless setTimeout call (missing quotes around argument?)"

And there was no delay in the collapse.

I placed the argument in quotes (though recommended against here) like this:

Code:
this.o_showtimer = setTimeout( "expandItem(this.n_id, n_id)",
o_item.getprop('expd_delay'));


but this didn't work. It appeared that nothing was happening at all and throwing some console.log() messages into the code confirmed this.

I tried using an anonymous function call as recommended here and here like this:

Code:
this.o_showtimer = setTimeout( function() { expandItem(this.n_id, n_id); },
o_item.getprop('expd_delay'));


but this didn't work either. It produced undesirable results in IE (items not collapsing is the same manner as before) and nothing happening in Firefox (placing console.log() statements in expandItem and collapseItem functions confirmed that they weren't being called).

All help would be greatly appreciated.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/