473,781 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Popup Main Window Refresh

ok i have two forms. Customer.aspx and Parent_Searh.as px. 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.l ocation.href = window.opener.l ocation.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 3175
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.as px. 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.l ocation.href = window.opener.l ocation.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.as px. 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.l ocation.href = window.opener.l ocation.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.R efresh();

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.as px. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_searc h 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.opene r.location.href = window.opener.l ocation.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 causesvalidatio n=false. Then on the popup window side I
called the button clickwith this code

window.opener.f rmCustomer.btnP ostBack.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.R efresh();

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.as px. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_searc h 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.opene r.location.href = window.opener.l ocation.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
2036
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 come back to form A so I can refresh the screen from the database if a record was added or the data changed that I'm displaying. My question is: What is the best way to figure out when form b finishes and return to form A so that I can run this...
3
4792
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 popup A. How do i refer to the very first parent window? Visual...
5
2861
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 the result to main page (I mean, update the parent page). My popup form looks like this: <form name="form1" action="run.php" method="get" target="???">
5
2516
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 database the DataGrid is using as a data source. When the popup window is closed I want to refresh the main window -- i.e., cause a postback to happen. Is this possible?
3
5220
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 use opener.location.reload() to refresh the parent window. Most of the time this works fine, but one parent in particular always asks if we want to refresh the window (re post the form data), and I get that "retry / cancel" dialog box.
5
518
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 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: ...
3
3581
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 and then do a refresh of the calling form. Any ideas on how to get a reference to the calling form? I tried window.parent.location.reload() , but it doesn't work. Thanks a lot.
1
1844
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 reinitialize the refference (popup window refference) to refresh window.
3
4293
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, once the popup window re-loads itself by posting a form to itself, all Javascript state information is lost and so opener is undefined. Is there any way I can communicate with the original opener of a popup window once the popup window has been...
0
10308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.