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

subwindow - refresh parent.

Greetings,

how to refresh or reload a parent window after processing forms from the
subwindow?

Currently I have a solution (see below) which works with IE and
Konqueror, but not with Firefox, so I assume it's not a clean solution.

ParentWindow:
==============
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body onLoad="self.name='MainWindow';">
Date: <!--#exec cmd="date" --><hr>
<a href="t2.html?pass=1" target='SubWindow'>Open SubWindow</a>
</body>
</html>

SubWindow
=========
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<form action="t1.html" target="MainWindow"
onClick="window.close();" method="post">
text: <input type="text" value="" name="text">
<input type="submit" value="OK">
<input type="hidden" name="pass" value="2">
</form>
</body>
</html>


Thanks for reading and hints
Wolf
Jul 24 '07 #1
1 2262
Wolf Grossi said the following on 7/24/2007 7:13 AM:
Greetings,

how to refresh or reload a parent window after processing forms from the
subwindow?
Try to open the second page with a call to window.open and then set the
target to window.opener via script.
Currently I have a solution (see below) which works with IE and
Konqueror, but not with Firefox, so I assume it's not a clean solution.
I don't think it works as well in IE as you would want it to.

<snip>
<form action="t1.html" target="MainWindow"
onClick="window.close();" method="post">
In IE7, that window.close() call prompts me asking if I want to allow it
to close the window. In FF2.0 it silently closes the window (which it
shouldn't as script didn't open it).

Just don't tell anyone that IE gets it right and FF is getting it wrong
though.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 24 '07 #2

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

Similar topics

1
by: Venkat | last post by:
Hi All, I have got two windows namely parent and a child . My parent window has got a link, on clicking which opens a child window(i am using window.open function). I do the following set...
4
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...
2
by: Paul Moffitt | last post by:
We have a Javascript function that opens an electronic document in a subwindow. The Title bar of the subwindow shows the filepath of the document. Looking at the script below is there any way to...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
1
by: Marcel | last post by:
I have a subwindow hich displays a grid. When the user selects a row from the grid, I wish to store the selected row ID in session state and close the subwindow, returning focus to the parent...
5
by: Peter | last post by:
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window 2) the popup window will have a button and when a user clicks on the button the...
6
by: Wolf Grossi | last post by:
Greetings, how to refresh a parent window after processing forms from the subwindow? Currently I have a solution (see below) which works with IE and Konqueror, but not with Firefox, so I...
2
by: nicofari | last post by:
Hi all, I would need to open a "subwindow of a subwindow". From first page (say "main.html") I open a window using javascript window.open('form1.html',...) After that I have two browser...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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,...
0
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...

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.