[jQuery] Re: getting to a variable in the parent frame - stumped

2009-01-24 Thread Shawn Grover
By declaring "var module" inside the function, that variable only exists inside the function. If you need access to that variable outside the function, you need to either return it from the function (i.e. return module; ) or declare the variable in the global scope. Something like this:

[jQuery] Re: getting to a variable in the parent frame - stumped

2009-01-23 Thread jay
That makes sense. I think you just need document if you need to access the other frame's DOM tree. On Jan 23, 4:04 pm, jquertil wrote: > oh! I got it. thanks Jay, your suggestion gave me the hint I needed to > figure it out. > > removing var did 1/2 the trick, the second 1/2 was me realizing tha

[jQuery] Re: getting to a variable in the parent frame - stumped

2009-01-23 Thread jquertil
oh! I got it. thanks Jay, your suggestion gave me the hint I needed to figure it out. removing var did 1/2 the trick, the second 1/2 was me realizing that now I have module as object of the top document, so top.module.something1('hello'); works. yay! this drove me crazy last night!

[jQuery] Re: getting to a variable in the parent frame - stumped

2009-01-23 Thread jquertil
thanks - that was an interesting consideration. Unfortunately didn't make a difference. (still scratching head)

[jQuery] Re: getting to a variable in the parent frame - stumped

2009-01-23 Thread jay
perhaps you need to do this.module = {...}? Doing var module makes it "private" I believe On Jan 23, 3:31 pm, jquertil wrote: > I'm using frames (don't ask) and have exhausted my abilities > (sniff)... here is some pseudo-code to illustrate the situation: > > first, CONT