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