473,480 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

reloading windows

Sam
I am constructing a company intranet.
On the intranet I made an overview-page which displays the availability of
equipment.
The information comes out of a database, and is retrieved by php-script.
The users of the database should be able to change the status of the
equipment.
On the overview-page, I placed a button next to each piece of equipment.
On pressing the button, a new window is opened, in which the user can input
the changes.
On this new window, a "submit"-button and a "cancel"-button can be pressed.
On pressing the submit-button, a php-script is called to make the changes in
the database, on "cancel", the new window is closed.
After pressing the submit-button, I want the initial overview-page to be
reloaded (refreshed) with the new information.

Can anyone help me?

I already tried this, but nothing happens:

The overview-page contains the following script:

<script language="JavaScript" type="text/JavaScript">
window.name = "materieeloverzicht"
</script>

The php page contains the following script:

<script language="JavaScript" type="text/JavaScript">
materieeloverzicht.location.reload()
</script>
Jul 20 '05 #1
3 6012
If you have the luxury of supporting only Internet Explorer, have a
look at window.showModalDialog:

http://msdn.microsoft.com/workshop/author/dhtml/
reference/methods/showmodaldialog.asp

There is probably a more elegant solution based on window/frame/form
naming.

Hope that helps,
Ron
Jul 20 '05 #2
"Sam" <sa***********@tiscali.be> wrote in message news:<y_*********************@phobos.telenet-ops.be>...
I am constructing a company intranet.
On the intranet I made an overview-page which displays the availability of
equipment.
The information comes out of a database, and is retrieved by php-script.
The users of the database should be able to change the status of the
equipment.
On the overview-page, I placed a button next to each piece of equipment.
On pressing the button, a new window is opened, in which the user can input
the changes.
On this new window, a "submit"-button and a "cancel"-button can be pressed.
On pressing the submit-button, a php-script is called to make the changes in
the database, on "cancel", the new window is closed.
After pressing the submit-button, I want the initial overview-page to be
reloaded (refreshed) with the new information.

Can anyone help me?

I already tried this, but nothing happens:

The overview-page contains the following script:

<script language="JavaScript" type="text/JavaScript">
window.name = "materieeloverzicht"
</script>

The php page contains the following script:

<script language="JavaScript" type="text/JavaScript">
materieeloverzicht.location.reload()
</script>


materieeloverzicht looks to be a string not a window reference. You
have a perfectly good reference to the parent window in the child
window opener property, but it seems that you can use the window name
if you call window.open() with the name argument

// a.htm (parent)
<script type='text/javascript'>
window.name = 'bill';
function openB(){
window.open('b.htm');
}
window.onload = function (){
window.status = new Date(); // load indicator
window.setTimeout('window.status = window.defaultStatus', 2000);
}
</script>
<a href='#a1' name='a1' id='a1' onclick='openB(); return false;'>Open
b.htm</a>
// b.htm (child)
<script type='text/javascript'>
function reloadA(){
window.open('a.htm', 'bill',);
}
</script>
<a href='#a1' name='a1' id='a1' onclick='reloadA(); return
false;'>Reload a.htm</a>

Not an expert. FWIW.
Jul 20 '05 #3
DU
Sam wrote:
I am constructing a company intranet.
On the intranet I made an overview-page which displays the availability of
equipment.
The information comes out of a database, and is retrieved by php-script.
The users of the database should be able to change the status of the
equipment.
On the overview-page, I placed a button next to each piece of equipment.
On pressing the button, a new window is opened, in which the user can input
the changes.
On this new window, a "submit"-button and a "cancel"-button can be pressed.
On pressing the submit-button, a php-script is called to make the changes in
the database, on "cancel", the new window is closed.
After pressing the submit-button, I want the initial overview-page to be
reloaded (refreshed) with the new information.

Can anyone help me?

I already tried this, but nothing happens:

The overview-page contains the following script:

<script language="JavaScript" type="text/JavaScript">
window.name = "materieeloverzicht"
</script>

The window.name is just a string for the target. The window name does
not do much really except in js disabled contexts.
The php page contains the following script:

<script language="JavaScript" type="text/JavaScript">
materieeloverzicht.location.reload()
</script>


You need here a window object reference (not a window name) and you need
to set the reload to true so that a refresh (unconditional get) at the
server is mandatory.

Let's say you did:

<script type="text/css">
var WindowObjectReference = null; // must be global scope
function OpenWindowEquipmentAvailability()
{
if(WindowObjectReference == null || WindowObjectReference.closed)
{
WindowObjectReference = window.open(strUrl, strWindowName,
strWindowFeaturesList);
};
}
</script>

then later you can reload that window with changes thanks to

<script type="text/javascript">
WindowObjectReference.location.reload(true);
</script>
You could even combine both script content into 1 single one.

To close after a click of the cancel button, you would call in this order:
WindowObjectReference.close();
WindowObjectReference = null;

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #4

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

Similar topics

4
8160
by: Greg Bryant | last post by:
Wondering why my setcookies didn't have any impact, I noticed the line in the manual that said the page needs to be reloaded before they take effect (which does make a certain kind of sense). So,...
3
2587
by: jbj | last post by:
Something like a php function that can be called? I have php in a page that needs to be update periodically (basically poll results) without reloading the page around it (I do have a button you...
4
2752
by: J. J. Cale | last post by:
Hi Obviously I'm new to PHP. I would like to be able to update a table in a page from a database on the server without reloading the page each time. Is this possible with PHP? TIA Jimbo
8
3997
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
2
5066
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
3
2141
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
1
2569
by: Alex Gurevich | last post by:
Hi, I am having very strange problem, I have Dropdownlist (DDL) with callback function for SelectedIndexChanged event on asp.net page, which is populated in codebehind Page_OnLoad page. After...
0
1286
by: stephensaw | last post by:
I have written an application that change the registry inorder to modify the Windows default icons, but I needed to reboot and sometimes need to be perform in safe mode to change the icons. I had...
9
2959
by: andrewfelch | last post by:
Hello all, I'm using the metaclass trick for automatic reloading of class member functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 My problem is that if I 1)...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
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
7103
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...
1
6758
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...
0
7010
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...
0
5362
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,...
1
4799
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...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.