perhaps you need to do this.module = {...}? Doing var module makes it "private" I believe
On Jan 23, 3:31 pm, jquertil <til...@gmail.com> wrote: > I'm using frames (don't ask) and have exhausted my abilities > (sniff)... here is some pseudo-code to illustrate the situation: > > ------------------------ first, CONTAINER.HTM: > <script src=jquery.js></script> > $(function(){ > > var module = { > something1 : function(var1){ > alert(var2); > } > > } > }); > > <iframe src=iframe1.htm></iframe> > > ------------------------- now, IFRAME1.HTM > <script src=jquery.js></script> > $(function(){ > $('#myDiv').click(function(){ > top.frames[0].document.module.something1('hello'); > // this line above is the part where I'm stuck. > //why won't this darn thing cooperate and alert my variable? > }); > > }); > > <div id=mydiv>click me</div>