473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Running Function after popup close's

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
Nov 19 '05 #1
6 1399
Ruca

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

Cor
Nov 19 '05 #2
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" <no************@planet.nl> escreveu na mensagem
news:uV**************@TK2MSFTNGP10.phx.gbl...
Ruca

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

Cor

Nov 19 '05 #3
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
Nov 19 '05 #4
How do you open the new window?

Eliyahu

"ruca" <ru***@iol.pt> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
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" <no************@planet.nl> escreveu na mensagem
news:uV**************@TK2MSFTNGP10.phx.gbl...
Ruca

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

Cor


Nov 19 '05 #5
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();
}

Nov 19 '05 #6
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

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark | last post by:
The situtation is that I'm trying to ensure that certain functions are only called by functions that I want them to be called from. I have a popup window which has a function which calls a function...
1
by: Christopher Finke | last post by:
I am writing a Firefox extension. I have a XUL window that opens when a menu option is chosen. The user fills in a form in the popup window, and then when the user clicks OK, I would like an http...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
2
by: ENIZIN | last post by:
I am having an interesting problem where I am simply trying to put in country selection popup window on my site. When the user closes the window the popup should call the...
6
by: ruca | last post by:
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??? --
3
by: paul | last post by:
HI! I have being to add the following as part of a function but it just will not work as is but I don't know why, can someone point out why. This opens up a popup window for a popup detection...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
4
by: badaczewski | last post by:
The following javascript appears on a popup window. <script language="javascript" type="text/javascript"> function InsertContact(value) { window.opener.CallBackContact(value); window.close();...
3
by: Jimmy | last post by:
It is also possible for popup window to call function in main window by using the opener property. Will "opener.someFunctionInMain(param1, param2)" in the popup window work? It's possible for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
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...
1
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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....
0
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.