Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Running Function after popup close's

Reply
Thread Tools

Running Function after popup close's

 
 
ruca
Guest
Posts: n/a
 
      05-02-2005
Hi,

How can I force to run a function when a popup window close's???

This function it's present in parent window. Can I run it after popup window
close's???
How can I do that???


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      05-02-2005
Ruca

What is in your opinion a popup window
A new window
A prompt
an alert

Cor


 
Reply With Quote
 
 
 
 
ruca
Guest
Posts: n/a
 
      05-02-2005
In this case I mean a New Window and that will return some values to parent
window.

Then can I run a function of parent window when popup is closed???


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


"Cor Ligthert" <(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> Ruca
>
> What is in your opinion a popup window
> A new window
> A prompt
> an alert
>
> Cor
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      05-02-2005
Ruca,

I don't kow that anymore. For the VBNet part is in my opinion the most
simple thing to use a (hidden) textbox that you fill by a javascript
function.

I see that you have crossposted this message as well to dotnet jScript. I
have it not at hand at the moment. I would in your case as well try it just
in one of those endless javascript sides.

One of them
http://javascript.internet.com/

I hope this helps anyway

Cor


 
Reply With Quote
 
Johan Nordberg
Guest
Posts: n/a
 
      05-02-2005
For IE you can use the window.showModalDialog() method. This pauses the
function until the dialog closes, they you can get the returned value
from the dialog.

In page that open the dialog:

function showDialog()
{
var dialog = window.showModalDialog("dialog.aspx", params,
"dialogWidth: 400px; dialogHeight: 300px;");
if(dialog != null)
// use the result here
}

In the dialog:
function init()
{
params = window.dialogArguments
// do stuff with params
}

function submitHandler()
{
// do stuff
window.returnValue = returnStuff;
window.close();
}

 
Reply With Quote
 
billmiami2@netscape.net
Guest
Posts: n/a
 
      05-02-2005
I normally place a "Close" or "Go" button on the popup. When this is
clicked, I place javascript into the dialog that runs the function on
the calling page as follows:

Sub CallFunctionOnCallingPage (ByVal obj As Object, ByVal e As
EventArgs) Handles lnkgo.Click

'Write the script to close and refresh the calling page
Dim strScript As String = "<script language=javascript>" &
vbCrLf
strScript += vbTab & "self.opener.myfunctiononcallingpage();"
strScript += vbTab & "window.close();"
strScript += "</script>"
Page.RegisterStartupScript("callfunctiononcallingp age",
strScript)
End Sub

Bill E.
Hollywood, FL

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-02-2005
How do you open the new window?

Eliyahu

"ruca" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In this case I mean a New Window and that will return some values to

parent
> window.
>
> Then can I run a function of parent window when popup is closed???
>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>
> "Cor Ligthert" <(E-Mail Removed)> escreveu na mensagem
> news:(E-Mail Removed)...
> > Ruca
> >
> > What is in your opinion a popup window
> > A new window
> > A prompt
> > an alert
> >
> > Cor
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Watir Javascript popup handler: How to handle the popup dialog? Rajesh Ruby 0 07-31-2007 04:36 AM
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
Popup Window Popup Timing =?Utf-8?B?Sm9obiBXYWxrZXI=?= ASP .Net 3 11-04-2005 07:33 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
trigger event on opener from popup when closing it or run opener script from popup Urs Gubler Javascript 0 07-02-2003 02:08 PM



Advertisments