Ask a Question related to ASP.NET General, Design and Development.
-
Deasun #1
How to close the browser down ?
Good evening all.
I know how to close the browser down when there is no
frames involved.
I have a frameset aspx page. It has 3 frames, left, main
and bottom.
In the left frame I have a exit button. I want the user
to be able to click on it and then the browser closes.
Anyone know how this can be done?
Also is there anyway other then using java code to kill
the browser on a button click?
Thanks
Deasun
Deasun Guest
-
SESSION and browser close
I have written a shopping cart application which kills all SESSION vars when the browser is closed. However, despite it working correctly on my... -
close all browser windows?
Does anyone know of any javascript or other method to close all open browser windows? I have an issue where a user logs in to our intranet through... -
Close Browser and Change URL - HELP!
Hi all, Here's my situation: I have a URL with a link that: 1. Opens a new browser window, in which reside an SWF movie. 2. At the end of... -
close my project that is in a browser window (close this window)
How can I do this with a button? What do I have to put into button? -
Browser Close Event
which event is fired when a browser is closed. i want to call asp page which deleet some files on the server. i tired using onunload event but it... -
Steve C. Orr, MCSD #2
Re: How to close the browser down ?
Try this javascript:
parent.window.close();
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Deasun" <tirnaog@mail.com> wrote in message
news:09d701c34fc5$112b0710$a001280a@phx.gbl...> Good evening all.
> I know how to close the browser down when there is no
> frames involved.
> I have a frameset aspx page. It has 3 frames, left, main
> and bottom.
> In the left frame I have a exit button. I want the user
> to be able to click on it and then the browser closes.
>
> Anyone know how this can be done?
> Also is there anyway other then using java code to kill
> the browser on a button click?
>
> Thanks
> Deasun
Steve C. Orr, MCSD Guest
-
Kevin Spencer #3
Re: How to close the browser down ?
You may need to do this (slight modification because the parent was not
opened by another window):
parent.opener = parent;
parent.close();
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
news:u0BEj78TDHA.2648@TK2MSFTNGP10.phx.gbl...> Try this javascript:
> parent.window.close();
>
> --
> I hope this helps,
> Steve C. Orr, MCSD
> [url]http://Steve.Orr.net[/url]
>
>
> "Deasun" <tirnaog@mail.com> wrote in message
> news:09d701c34fc5$112b0710$a001280a@phx.gbl...>> > Good evening all.
> > I know how to close the browser down when there is no
> > frames involved.
> > I have a frameset aspx page. It has 3 frames, left, main
> > and bottom.
> > In the left frame I have a exit button. I want the user
> > to be able to click on it and then the browser closes.
> >
> > Anyone know how this can be done?
> > Also is there anyway other then using java code to kill
> > the browser on a button click?
> >
> > Thanks
> > Deasun
>
Kevin Spencer Guest
-
Deasun O'Donnachadha #4
Re: How to close the browser down ?
Thanks for the help. I put the following under my btn click event:
Response.Write("<script>parent.opener =
parent;parent.close();</script>")
Didn't work. Tried your first example too. No help.
Any other ideas ?
Thanks
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Deasun O'Donnachadha Guest
-
Kevin Spencer #5
Re: How to close the browser down ?
Using Response.Write is dodgy at best. Try defining the script as a string,
and using RegisterStartupScript() to add it to the page. Also, which page
are you adding this to? It would have to be a page in a frame, not the
frameset itself.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Deasun O'Donnachadha" <tirnaog@mail.com> wrote in message
news:ednKhnEUDHA.2252@TK2MSFTNGP12.phx.gbl...>
>
> Thanks for the help. I put the following under my btn click event:
> Response.Write("<script>parent.opener =
> parent;parent.close();</script>")
>
> Didn't work. Tried your first example too. No help.
> Any other ideas ?
>
> Thanks
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Kevin Spencer Guest
-
Deasun O'Donnachadha #6
Re: How to close the browser down ?
Well tried that I did.
Didn't work. Here is what I have;
Note! I tried the following in both Page_Load and Page_Init
Dim scriptString As String = "<script>parent.opener" scriptString =
scriptString & "parent;parent.close"
scriptString = scriptString & "();</script>"
If (Not Me.IsStartupScriptRegistered("Do_CloseApp")) Then
Me.RegisterStartupScript("Do_CloseApp", scriptString)
End If
And under the btn click:
Response.Write("<script>Do_CloseApp();</script>")
That i am not sure is correct. Please let me know if that is the correct
way to call the script.
What did it do:
The browser appears and then disappears by itself. No error msgs.
Thanks for the help with this.
Deasun
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Deasun O'Donnachadha Guest



Reply With Quote

