[Proto-Scripty] Re: unable to set global variable from a new Ajax.request

2011-03-17 Thread Alphonso77
Thanks, TJ - you're awesome. Yeah - it wasn't a typo - I had a bug in my code. On Mar 17, 10:06 am, "T.J. Crowder" wrote: > @Alphonso77: > > > I know this has to do with variable scope... > > I doubt it.  The code you've quoted will (or rather, would) create/ > assign to a global variable provid

[Proto-Scripty] Finding Class methods

2011-03-17 Thread greg
Hi, Within my script I'd like to get a list of methods defined within in a class created with Class.create(). If I do: var c = new MyShinyNewClass() console.log(c) I get a nice breakdown of variables and methods, and firebug differentiates the vars from the functions. If I do: for (m in c) conso

[Proto-Scripty] Re: Prototype and jQuery

2011-03-17 Thread T.J. Crowder
Hi, It's not clear what's wrong from your message or examples. Fundamentally, if you want your first link to work when you add Prototype to the page, just add the `noConflict` call *immediately* after loading the jquery.js file and include the Prototype file, like so: jQuery.noConflict(); ..a

[Proto-Scripty] Re: unable to set global variable from a new Ajax.request

2011-03-17 Thread T.J. Crowder
@Alphonso77: > I know this has to do with variable scope... I doubt it. The code you've quoted will (or rather, would) create/ assign to a global variable provided `myGlobalVariable` isn't declared as a var within some containing function, which I assume it isn't. A couple of thoughts: 1. Bug

Re: [Proto-Scripty] unable to set global variable from a new Ajax.request

2011-03-17 Thread Walter Lee Davis
Did you try defining the variable in the global scope first? Something like this: var myGlobalVariable function stakeHolderModule(strDataNeeded){ new Ajax.Request('foo',{parameters:{bar:baz}, onSuccess: function(response){ myGlobalVariable = resp

[Proto-Scripty] unable to set global variable from a new Ajax.request

2011-03-17 Thread Alphonso77
I'm trying to either return a value or set a global variable from within a function run on the onSuccess event. I've tried defining an inline function and setting a global variable, returning a value, and even defining a separate function that gets called. The problem is that the variable is gett

[Proto-Scripty] Prototype and jQuery

2011-03-17 Thread Joseph O
This has been tossed around the net in many variations yet none have worked for me. I have done about ever work around for these two so they will like each other and have reached a dead end. I need my image fade menu to function with my flash driven lightbox. Please let me know if this is something