Thanks for the feedback.

I'm not sure whether or not thickbox is using an iframe.
Does it use one by default?  Would this code utilize an iframe?
Whether this code, which spawns a login dialogue, is run or not
is based on a conditional statement checking a user's login status.

I had been spawning a thickbox via a link, but now use this code
to auto-spawn a thickbox based on variable.  Would thickbox use
an iframe based on this code?

$(document).ready(function() {
                        
     var tb_pathToImage = "login/loadingAnimation.gif";
     imgLoader = new Image(); //preload image
     imgLoader.src = tb_pathToImage;
                        
tb_show("Login", "login/login_form.cfm?height=320&width=290&modal=true", false);
                                
});



> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of tlphipps
> Sent: Wednesday, December 17, 2008 10:35 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Relationship between thickbox and calling page...
> 
> 
> absolutely possible.  If you are NOT using an iframe in thickbox, then
> the thickbox is just another <div> on the calling page.  Therefore
> your jquery/javascript code would interact with elements exactly the
> same way it would interact if the code was on the calling page (since
> it really is still the calling page).
> 
> If you're using iframes (which we do in our system), then you have to
> address your elements properly so that your javascript code knows the
> elements exist on the calling page.  We do this by using jquery
> selectors similar to the following:
> 
> $("#someIDonParentPage", top.document)
> 
> On Dec 17, 9:26 am, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> > I'm trying to understand the relationship between the page that
> > spawns a thickbox and the code in the thickbox, itself.
> >
> > The question is:
> >
> > Can the jQuery code that is embedded in a thickbox affect
> > the elements on the page that spawned the thickbox?
> >
> > For instance: (pseudo-code)
> >
> > callingpage.cfm
> > ----------------------------------
> >
> > <has <p id="logstatus">Log In</p> on page>
> > <open thickbox>
> >
> > thickboxpage.cfm (in modal window)
> > ----------------------------------
> >
> > <thickbox runs some code, has success callback from Ajax function>
> > <part of the success code targets an element on callingpage.cfm
> > and, say, causes it to changed from "Log In" to "Log Out">
> > <close thickbox>
> >
> > callingpage.cfm
> > ----------------------------------
> > <calling page now has <p id="logstatus">Log Out</p> on page
> >
> > Is this type of thing possible?  I'm unsure of the relationship
> > that a calling page has with a modal window it may spawn.
> >
> > Thanks for any insight.
> >
> > Rick

Reply via email to