473,287 Members | 1,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,287 software developers and data experts.

Popup Main Window Refresh

ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:

window.opener.location.href = window.opener.location.href;

and the parent information is displayed on the screen. Problem is the
command above does a refresh and not a postback so when it hits the line

if not ispostback then

it runs that if statement and refreshes all the fields thus losing any info
added before selecting the parent. Question how do i refresh with a postback?
Jul 21 '05 #1
4 3117
Instead of resetting the href location you should manually trigger the
postback. The article at the following link shows how to do this and
you should be able to extend it to fit your needs.

http://www.xefteri.com/articles/dec102002/default.aspx

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Andrew Alger wrote:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:

window.opener.location.href = window.opener.location.href;

and the parent information is displayed on the screen. Problem is the
command above does a refresh and not a postback so when it hits the line

if not ispostback then

it runs that if statement and refreshes all the fields thus losing any info
added before selecting the parent. Question how do i refresh with a postback?

Jul 21 '05 #2
the only problem with this is i need to know how to call a postback call to
customer.aspx from parent.aspx

"John M Deal" wrote:
Instead of resetting the href location you should manually trigger the
postback. The article at the following link shows how to do this and
you should be able to extend it to fit your needs.

http://www.xefteri.com/articles/dec102002/default.aspx

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Andrew Alger wrote:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:

window.opener.location.href = window.opener.location.href;

and the parent information is displayed on the screen. Problem is the
command above does a refresh and not a postback so when it hits the line

if not ispostback then

it runs that if statement and refreshes all the fields thus losing any info
added before selecting the parent. Question how do i refresh with a postback?

Jul 21 '05 #3
All you have to do is call it from client side script the same way you
were setting the location. I would setup a client side refresh method
on the parent.aspx page that was wired up to its postback along the
lines of:
function Refresh(){...}
then I'd call it from customer.aspx using:
window.opener.Refresh();

That should do it.

John M Deal, MCP
Necessity Software
Andrew Alger wrote:
the only problem with this is i need to know how to call a postback call to
customer.aspx from parent.aspx

"John M Deal" wrote:

Instead of resetting the href location you should manually trigger the
postback. The article at the following link shows how to do this and
you should be able to extend it to fit your needs.

http://www.xefteri.com/articles/dec102002/default.aspx

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Andrew Alger wrote:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:

window.opener.location.href = window.opener.location.href;

and the parent information is displayed on the screen. Problem is the
command above does a refresh and not a postback so when it hits the line

if not ispostback then

it runs that if statement and refreshes all the fields thus losing any info
added before selecting the parent. Question how do i refresh with a postback?

Jul 21 '05 #4
For anyone's future reference this is what i did. I added a hidden button
named
btnPostBack with causesvalidation=false. Then on the popup window side I
called the button clickwith this code

window.opener.frmCustomer.btnPostBack.click();

That did a postback to customer.aspx.

"John M Deal" wrote:
All you have to do is call it from client side script the same way you
were setting the location. I would setup a client side refresh method
on the parent.aspx page that was wired up to its postback along the
lines of:
function Refresh(){...}
then I'd call it from customer.aspx using:
window.opener.Refresh();

That should do it.

John M Deal, MCP
Necessity Software
Andrew Alger wrote:
the only problem with this is i need to know how to call a postback call to
customer.aspx from parent.aspx

"John M Deal" wrote:

Instead of resetting the href location you should manually trigger the
postback. The article at the following link shows how to do this and
you should be able to extend it to fit your needs.

http://www.xefteri.com/articles/dec102002/default.aspx

Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Andrew Alger wrote:

ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:

window.opener.location.href = window.opener.location.href;

and the parent information is displayed on the screen. Problem is the
command above does a refresh and not a postback so when it hits the line

if not ispostback then

it runs that if statement and refreshes all the fields thus losing any info
added before selecting the parent. Question how do i refresh with a postback?

Jul 21 '05 #5

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

Similar topics

6
by: Logger | last post by:
Help, Want someone's option. I'm calling a popup screen, say form B, to add/edit a record. In, say form A, I call form B using javascript window.open in server side code. I need to know when I...
3
by: MEM | last post by:
Hello, I'd like to refresh the main or top most browser window from a child window. Specifically, child popup A is opened by a main browser window then child popup B is opened from within child...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
5
by: Jay | last post by:
I have a situation where the user clicks on a button in a DataGrid to launch a popup window via javascript. In the popup window the user does some things that result in changes to the underlying...
3
by: dhnriverside | last post by:
Hi peeps I'm developing an intranet application which uses a main window and various popups created with javascript ( window.open() ). When the user saves what they are doing in the popup, i...
5
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
1
by: gopalkrishna | last post by:
Hi All, I opend a popup window using var pouWin = window.open('one.html','popupName'); I control everthing forn parent window. If i refresh parent window the link between them are broken, how to...
3
by: Bruce | last post by:
I have an application where a main window opens a popup window. Within the popup, I want to be able to post a form back to the popup all the while maintaining the opener property. Of course,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
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...
0
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...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
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...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

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.