List Info

Thread: Open and Close




Open and Close
country flaguser name
United States
2007-03-20 13:02:52
Hello all. Looking to do something pretty simple, but not
finding a
great solution. I have a form that runs a javascript check
when
posted. What I need is for a pop up window to open when the
form is
submitted. Then, after the form is processed on that page
and the page
is redirected (I do this in .asp) the page that the user has
been
redirected to closes the pop up opened on the previous page.
Any
ideas? Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
country flaguser name
United States
2007-03-20 15:28:32
Hi.

I think this is rather impossible. You can control the
opened window
only from itself, or from its opener (the page that opened
it). The
other pages do not have access to the popup window.

On Mar 20, 7:02 pm, "Window Frog" <m...deepskystudio.com> wrote:
> Hello all. Looking to do something pretty simple, but
not finding a
> great solution. I have a form that runs a javascript
check when
> posted. What I need is for a pop up window to open when
the form is
> submitted. Then, after the form is processed on that
page and the page
> is redirected (I do this in .asp) the page that the
user has been
> redirected to closes the pop up opened on the previous
page. Any
> ideas? Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
country flaguser name
United States
2007-03-20 22:53:23
On Mar 20, 2:02 pm, "Window Frog" <m...deepskystudio.com> wrote:
> Hello all. Looking to do something pretty simple, but
not finding a
> great solution. I have a form that runs a javascript
check when
> posted. What I need is for a pop up window to open when
the form is
> submitted. Then, after the form is processed on that
page and the page
> is redirected (I do this in .asp) the page that the
user has been
> redirected to closes the pop up opened on the previous
page. Any
> ideas? Thanks.

You'll need to use the window.open method to reestablish a
reference
to the popup. You'll need to use the same window name that
you used
when you opened the popup originally.

function close_popup(){
  page = 'blank.htm';
  popup = window.open(page,'originalPopupWindowName');
  popup.close();
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
country flaguser name
United States
2007-03-21 08:27:31


On Mar 20, 11:53 pm, "Jambalaya"
<chris.ak...gmail.com> wrote:
> On Mar 20, 2:02 pm, "Window Frog"
<m...deepskystudio.com> wrote:
>
> > Hello all. Looking to do something pretty simple,
but not finding a
> > great solution. I have a form that runs a
javascript check when
> > posted. What I need is for a pop up window to open
when the form is
> > submitted. Then, after the form is processed on
that page and the page
> > is redirected (I do this in .asp) the page that
the user has been
> > redirected to closes the pop up opened on the
previous page. Any
> > ideas? Thanks.
>
> You'll need to use the window.open method to
reestablish a reference
> to the popup. You'll need to use the same window name
that you used
> when you opened the popup originally.
>
> function close_popup(){
>   page = 'blank.htm';
>   popup = window.open(page,'originalPopupWindowName');
>   popup.close();
>
> }

On my first page I have:

function openDep() {
  win = window.open("../../welcome.html",
"win",
"height=200,width=400");
}

This is fired when my form check script completes and opens
a window
just fine. I have a .asp script that executes and then
redirects the
user to another page. This page has:

function close_popup(){
  page = '../../welcome.html';
  popup = window.open(page,'win');
  popup.close();

This currently fired in the "onload" of the body,
but it does not
close the window as desired. Have I done something wrong?
Thanks for
all the help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
country flaguser name
United States
2007-03-21 14:31:23


On Mar 21, 9:27 am, "Window Frog" <m...deepskystudio.com> wrote:
> On Mar 20, 11:53 pm, "Jambalaya"
<chris.ak...gmail.com> wrote:
>
>
>
> > On Mar 20, 2:02 pm, "Window Frog"
<m...deepskystudio.com> wrote:
>
> > > Hello all. Looking to do something pretty
simple, but not finding a
> > > great solution. I have a form that runs a
javascript check when
> > > posted. What I need is for a pop up window to
open when the form is
> > > submitted. Then, after the form is processed
on that page and the page
> > > is redirected (I do this in .asp) the page
that the user has been
> > > redirected to closes the pop up opened on the
previous page. Any
> > > ideas? Thanks.
>
> > You'll need to use the window.open method to
reestablish a reference
> > to the popup. You'll need to use the same window
name that you used
> > when you opened the popup originally.
>
> > function close_popup(){
> >   page = 'blank.htm';
> >   popup =
window.open(page,'originalPopupWindowName');
> >   popup.close();
>
> > }
>
> On my first page I have:
>
> function openDep() {
>   win = window.open("../../welcome.html",
"win",
> "height=200,width=400");
>
> }
>
> This is fired when my form check script completes and
opens a window
> just fine. I have a .asp script that executes and then
redirects the
> user to another page. This page has:
>
> function close_popup(){
>   page = '../../welcome.html';
>   popup = window.open(page,'win');
>   popup.close();
>
> This currently fired in the "onload" of the
body, but it does not
> close the window as desired. Have I done something
wrong? Thanks for
> all the help.

Thanks for the help all. I found a different solution by
calling the
body onUnload. Works great.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
country flaguser name
United States
2007-03-21 20:23:07
I suggest not doing so. Instead, you can show a "div
modal dialog" in
the page, and it will makes user feel more comfortable.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Open and Close
user name
2007-03-23 19:43:16
I don't think this is true ...

As long as the window is named ... E.g.  window.open(
'popup.asp',
'namedwindow', ... );

)Ou should be able to ref that named window in any open web
page.

E.g. ... From a new window ...

If ( namedwindow )
{
     namedwindow.location = 'home.asp';
}

Does this make sense?


On 3/20/07, centi <ivan.centesgmail.com> wrote:
>
> Hi.
>
> I think this is rather impossible. You can control the
opened window
> only from itself, or from its opener (the page that
opened it). The
> other pages do not have access to the popup window.
>
> On Mar 20, 7:02 pm, "Window Frog"
<m...deepskystudio.com> wrote:
> > Hello all. Looking to do something pretty simple,
but not finding a
> > great solution. I have a form that runs a
javascript check when
> > posted. What I need is for a pop up window to open
when the form is
> > submitted. Then, after the form is processed on
that page and the page
> > is redirected (I do this in .asp) the page that
the user has been
> > redirected to closes the pop up opened on the
previous page. Any
> > ideas? Thanks.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )