[jQuery] Re: Scoping issue with load and call back function.

2009-05-08 Thread Stever
Josh and all, I figured out a way around the issue using the ajaxStop function. The ajaxStop event is triggered when all outstanding requests (load in this case) are complete. When this happens all the tables I wish to load are loaded to the document. My original code was trying to grab informat

[jQuery] Re: Scoping issue with load and call back function.

2009-05-07 Thread Josh Nathanson
lf Of Stever Sent: Thursday, May 07, 2009 4:28 AM To: jQuery (English) Subject: [jQuery] Re: Scoping issue with load and call back function. Josh, First the firstload=0 and not resetting the variable was left off. But ultimately is unrelated to the asynchronous problem you pointed out. Asynchro

[jQuery] Re: Scoping issue with load and call back function.

2009-05-07 Thread Stever
Josh, First the firstload=0 and not resetting the variable was left off. But ultimately is unrelated to the asynchronous problem you pointed out. Asynchronous loading makes a big difference here. As a pretty recent user of jquery, I obviously designed this code wrong. So here is what I what to

[jQuery] Re: Scoping issue with load and call back function.

2009-05-06 Thread Josh Nathanson
as in your second email. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Stever Sent: Wednesday, May 06, 2009 4:31 PM To: jQuery (English) Subject: [jQuery] Re: Scoping issue with load and call back function. Josh thanks for

[jQuery] Re: Scoping issue with load and call back function.

2009-05-06 Thread Stever
Josh thanks for the quick response. I tried putting the variables var TableCells=[,]; var TableRowName =[,]; var TableColName =[,]; outside the document ready function. Originally. (not redefined with var inside document ready shown here). http://www.hou.asp.ti.com/ sparcit_data_re

[jQuery] Re: Scoping issue with load and call back function.

2009-05-06 Thread Josh Nathanson
When you say you get undefined outside the load function, do you mean outside $(document).ready, or inside $(document).ready? They should not be accessible outside document.ready, because of the closure caused by passing the anonymous function to document.ready, and because you use var to declare

[jQuery] Re: Scoping Issue??

2007-10-11 Thread brassica
Thx a bill mike :) it works and i understand your explanation yes i was aware of the var...i had actually included it in my code just forgot to include it in my sample code...didnt work with var either :) Thanx again On 11 Oct, 17:48, "Michael Geary" <[EMAIL PROTECTED]> wrote: > > From: brassic

[jQuery] Re: Scoping Issue??

2007-10-11 Thread Michael Geary
> From: brassica > > var lastNum = 5; //say > for (i = 49; i <= (49+lastNum); i++) > { > $.hotkeys.add(String.fromCharCode(i), function () > {levelClicked(i)}); } > > function levelClicked(i) > { > alert (i); > } > > now it always alerts as whichever value lastNum was assigned to : > ( irresp