Thursday, March 22, 2012

modal dialog and returned results

(please dont say don't do this because SP2 will block this, this is an
internal site and i have full access to settings on the domain to make popup
blocking turned off for this site)

i have a modal dialog box, which lets users select user names from a list
(kinda like an address book) but then i need to return that list to the
calling application form... how would i go about doing this? thanks!to reutn an object from a modal window to the caller, require the caller
window to clone the objects. this is because when the modal window is
closed, all javascript memory is recovered. any ref to objects in the the
caller will reutrn null. for this reason returnValue can only return a
simple object (int/string).

the best approach is to call a method in the caller (opener window) and
pass your list to it, and have the caller clone it.

-- bruce (sqlwork.com)

"Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
news:%234UapvDZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> (please dont say don't do this because SP2 will block this, this is an
> internal site and i have full access to settings on the domain to make
popup
> blocking turned off for this site)
> i have a modal dialog box, which lets users select user names from a list
> (kinda like an address book) but then i need to return that list to the
> calling application form... how would i go about doing this? thanks!
how would i call a parent form from a modal form though?

"bruce barker" <nospam_brubar@.safeco.com> wrote in message
news:eHT1HNEZEHA.716@.TK2MSFTNGP11.phx.gbl...
> to reutn an object from a modal window to the caller, require the caller
> window to clone the objects. this is because when the modal window is
> closed, all javascript memory is recovered. any ref to objects in the the
> caller will reutrn null. for this reason returnValue can only return a
> simple object (int/string).
> the best approach is to call a method in the caller (opener window) and
> pass your list to it, and have the caller clone it.
> -- bruce (sqlwork.com)
>
> "Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
> news:%234UapvDZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > (please dont say don't do this because SP2 will block this, this is an
> > internal site and i have full access to settings on the domain to make
> popup
> > blocking turned off for this site)
> > i have a modal dialog box, which lets users select user names from a
list
> > (kinda like an address book) but then i need to return that list to the
> > calling application form... how would i go about doing this? thanks!
<script>
if (window.opener.myRoutine)
{
window.opener.myRoutine(someData);
}
</script
-- bruce (sqlwork.com)

"Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
news:ue64lSFZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> how would i call a parent form from a modal form though?
>
> "bruce barker" <nospam_brubar@.safeco.com> wrote in message
> news:eHT1HNEZEHA.716@.TK2MSFTNGP11.phx.gbl...
> > to reutn an object from a modal window to the caller, require the caller
> > window to clone the objects. this is because when the modal window is
> > closed, all javascript memory is recovered. any ref to objects in the
the
> > caller will reutrn null. for this reason returnValue can only return a
> > simple object (int/string).
> > the best approach is to call a method in the caller (opener window) and
> > pass your list to it, and have the caller clone it.
> > -- bruce (sqlwork.com)
> > "Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
> > news:%234UapvDZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > > (please dont say don't do this because SP2 will block this, this is an
> > > internal site and i have full access to settings on the domain to make
> > popup
> > > blocking turned off for this site)
> > > > i have a modal dialog box, which lets users select user names from a
> list
> > > (kinda like an address book) but then i need to return that list to
the
> > > calling application form... how would i go about doing this? thanks!
> >
ah thanks

"bruce barker" <nospam_brubar@.safeco.com> wrote in message
news:%23CrL7YFZEHA.2576@.TK2MSFTNGP10.phx.gbl...
> <script>
> if (window.opener.myRoutine)
> {
> window.opener.myRoutine(someData);
> }
> </script>
>
> -- bruce (sqlwork.com)
> "Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
> news:ue64lSFZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> > how would i call a parent form from a modal form though?
> > "bruce barker" <nospam_brubar@.safeco.com> wrote in message
> > news:eHT1HNEZEHA.716@.TK2MSFTNGP11.phx.gbl...
> > > to reutn an object from a modal window to the caller, require the
caller
> > > window to clone the objects. this is because when the modal window is
> > > closed, all javascript memory is recovered. any ref to objects in the
> the
> > > caller will reutrn null. for this reason returnValue can only return a
> > > simple object (int/string).
> > > > the best approach is to call a method in the caller (opener window)
and
> > > pass your list to it, and have the caller clone it.
> > > > -- bruce (sqlwork.com)
> > > > > "Brian Henry" <brianiupmsdn@.newsgroups.nospam> wrote in message
> > > news:%234UapvDZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > > > (please dont say don't do this because SP2 will block this, this is
an
> > > > internal site and i have full access to settings on the domain to
make
> > > popup
> > > > blocking turned off for this site)
> > > > > > i have a modal dialog box, which lets users select user names from a
> > list
> > > > (kinda like an address book) but then i need to return that list to
> the
> > > > calling application form... how would i go about doing this? thanks!
> > > > > >

0 comments:

Post a Comment