Looks like this is either too obvious for anyone to address, or it just
isn't done by anyone. There was a question in early sep this year that no
one replied to, and I don't find any other references. So here goes again:
I want to close my popup from an asp codebehind event handler. The
following does not work (this is an event handler for the Login control)
protected void OnLoggedIn(object sender, EventArgs e)
{
Response.Write ("<script language =
javascript>close();</script>");
}
Instead of closing the window and returning to the calling window, the
calling page is opened (again) in the same window.
Jeremy 4 13919
try putting Response.End after it
did u try debug break in onloggedin? does it go there?
On Nov 22, 8:11 am, "Jeremy" <jeremy-nos...@ninprodata.comwrote:
Looks like this is either too obvious for anyone to address, or it just
isn't done by anyone. There was a question in early sep this year that no
one replied to, and I don't find any other references. So here goes again:
I want to close my popup from an asp codebehind event handler. The
following does not work (this is an event handler for the Login control)
protected void OnLoggedIn(object sender, EventArgs e)
{
Response.Write ("<script language =
javascript>close();</script>");
}
Instead of closing the window and returning to the calling window, the
calling page is opened (again) in the same window.
Jeremy
Nick, bless you! Response.end() is the answer.
Mark Rae, in a different thread is saying that this technique of pumping
script into html is a bad thing. Unfortunately, I don't know any other way
to get the window closed from codebehind. Is there some other technique? He
suggests registering a client script, but that begs the question; how to
call the script from codebehind?
Jeremy
"Nick Chan" <zz*******@yahoo.comwrote in message
news:ee**********************************@e10g2000 prf.googlegroups.com...
try putting Response.End after it
did u try debug break in onloggedin? does it go there?
On Nov 22, 8:11 am, "Jeremy" <jeremy-nos...@ninprodata.comwrote:
>Looks like this is either too obvious for anyone to address, or it just isn't done by anyone. There was a question in early sep this year that no one replied to, and I don't find any other references. So here goes again:
I want to close my popup from an asp codebehind event handler. The following does not work (this is an event handler for the Login control)
protected void OnLoggedIn(object sender, EventArgs e) { Response.Write ("<script language = javascript>close();</script>"); }
Instead of closing the window and returning to the calling window, the calling page is opened (again) in the same window.
Jeremy
This is the only way, always remember that manipulating windows occur in the
client side, hence the client side script is use to meet this requirements.
"Jeremy" wrote:
Nick, bless you! Response.end() is the answer.
Mark Rae, in a different thread is saying that this technique of pumping
script into html is a bad thing. Unfortunately, I don't know any other way
to get the window closed from codebehind. Is there some other technique? He
suggests registering a client script, but that begs the question; how to
call the script from codebehind?
Jeremy
"Nick Chan" <zz*******@yahoo.comwrote in message
news:ee**********************************@e10g2000 prf.googlegroups.com...
try putting Response.End after it
did u try debug break in onloggedin? does it go there?
On Nov 22, 8:11 am, "Jeremy" <jeremy-nos...@ninprodata.comwrote:
Looks like this is either too obvious for anyone to address, or it just
isn't done by anyone. There was a question in early sep this year that
no
one replied to, and I don't find any other references. So here goes
again:
I want to close my popup from an asp codebehind event handler. The
following does not work (this is an event handler for the Login control)
protected void OnLoggedIn(object sender, EventArgs e)
{
Response.Write ("<script language =
javascript>close();</script>");
}
Instead of closing the window and returning to the calling window, the
calling page is opened (again) in the same window.
Jeremy
it is very odd that in your case response.write without response.end
wont work
maybe it has something to do with login control
if response.write without response.end wont work, i doubt registering
client script will
anyway, to register client script :
Page.ClientScript.RegisterStartupScript(Page.GetTy pe,
"scriptName_FreeText", "<script type=""text/javascript"">close()</
script>")
(or RegisterClientScript, i think!)
On Nov 22, 9:56 am, "Jeremy" <jeremy-nos...@ninprodata.comwrote:
Nick, bless you! Response.end() is the answer.
Mark Rae, in a different thread is saying that this technique of pumping
script into html is a bad thing. Unfortunately, I don't know any other way
to get the window closed from codebehind. Is there some other technique? He
suggests registering a client script, but that begs the question; how to
call the script from codebehind?
Jeremy
"Nick Chan" <zzzxtr...@yahoo.comwrote in message
news:ee**********************************@e10g2000 prf.googlegroups.com...
try putting Response.End after it
did u try debug break in onloggedin? does it go there?
On Nov 22, 8:11 am, "Jeremy" <jeremy-nos...@ninprodata.comwrote:
Looks like this is either too obvious for anyone to address, or it just
isn't done by anyone. There was a question in early sep this year that
no
one replied to, and I don't find any other references. So here goes
again:
I want to close my popup from an asp codebehind event handler. The
following does not work (this is an event handler for the Login control)
protected void OnLoggedIn(object sender, EventArgs e)
{
Response.Write ("<script language =
javascript>close();</script>");
}
Instead of closing the window and returning to the calling window, the
calling page is opened (again) in the same window.
Jeremy- Hide quoted text -
- Show quoted text -
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ron L |
last post by:
I have an MDI application with a number of child windows. In each child
window I am catching the Closing event and having the child window decide if
it should set cancel to true. The intent here...
|
by: SteveS |
last post by:
Hello. This is a strange problem which does not make sense to me.
I open a popup page with the following javascript code:
function OpenDenyWindow(changeId) {...
|
by: Chrysan |
last post by:
I have a popup window, which consist of a asp:textbox and a asp:button. And,
I would like to pass the textbox.text to the javascript function when I click
the button. Besides, by clicking the...
|
by: Charles Law |
last post by:
For some reason, when I click the X to close my MDI parent form, the action
appears to be re-directed to one of the MDI child forms, and the parent
remains open. I am then unable to close the...
|
by: Tom |
last post by:
How is the best way to avoid validation when closing a
window? For instance, I have a Windows Forms window which
has a validation event for a text box. However, if one
enters invalid data in then...
|
by: srinivas |
last post by:
Hi
I'm having a asp.net page.When i'm clicking on the Logout hyperlink i want
to close the window and clear the session.
Actually i have taken LinkButton control and written a javascript function...
|
by: Tony |
last post by:
I need to know how to open a pop up and close the main window without
a prompt in Firefox 2 and IE 7. Anybody have any ideas on how to do
that.
I currently have this and it works in IE 6 and...
|
by: Simon van Beek |
last post by:
Dear reader,
By opening an application I get always the main Access window with the
closing cross in the above right corner. Is there a possibility to make
this closing cross invisible?
...
|
by: Todd Cary |
last post by:
I create a new window with
onClick="openBrWindow(\'claimant_pdf.php\',\'\',\'toolbar=no,status=yes,scrollbars=no,resizable=no\')"
as part of a submit button.
Now I would like to close the...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |