473,795 Members | 2,914 Online
Bytes | Software Development & Data Engineering Community
+ 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="JavaS cript" type="text/JavaScript">
window.name = "materieeloverz icht"
</script>

The php page contains the following script:

<script language="JavaS cript" type="text/JavaScript">
materieeloverzi cht.location.re load()
</script>
Jul 20 '05 #1
3 6029
If you have the luxury of supporting only Internet Explorer, have a
look at window.showModa lDialog:

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="JavaS cript" type="text/JavaScript">
window.name = "materieeloverz icht"
</script>

The php page contains the following script:

<script language="JavaS cript" type="text/JavaScript">
materieeloverzi cht.location.re load()
</script>


materieeloverzi cht 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.setTimeo ut('window.stat us = window.defaultS tatus', 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='reload A(); 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="JavaS cript" type="text/JavaScript">
window.name = "materieeloverz icht"
</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="JavaS cript" type="text/JavaScript">
materieeloverzi cht.location.re load()
</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 WindowObjectRef erence = null; // must be global scope
function OpenWindowEquip mentAvailabilit y()
{
if(WindowObject Reference == null || WindowObjectRef erence.closed)
{
WindowObjectRef erence = window.open(str Url, strWindowName,
strWindowFeatur esList);
};
}
</script>

then later you can reload that window with changes thanks to

<script type="text/javascript">
WindowObjectRef erence.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:
WindowObjectRef erence.close();
WindowObjectRef erence = 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
8182
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, how do I force a page to reload? Thanks, Greg
3
2613
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 can click). Is this possible? Or should I make some sort of Iframe with the php page in it that could be reloaded. The php code basicaly just writes a table to the page with the results of the polls included. Thanks for the help.
4
2773
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
4015
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 answer. The problem is this: when the user presses the Calculate button, the whole page is reloaded and, on a large page, this is very noticeable. Is there any way that I can get the calculation done and the result displayed without reloading...
2
5100
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 page1 so I want to use onunload to reload page1 to keep the data synchronized. At first I was using just window.opener.parent.location = window.opener.parent.location;
3
2156
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 manual and a user first must press a button to get the listbox filled with records but I want to have it done automaticly without pressing a sumbit button. I know its prolly done with javascript but thats one thing
1
2582
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 postback of the page, througth on click event of a button on the page, and returning of the page to client side, usually selection of an item in the DDL trigers reloading of the page but not as a postback. Afterwads if you select another item in...
0
1308
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 installed the Microsoft Power Toys Tweak UI, I used the Repair->Rebuild Icons function to rebuild, then only my registry changes will take effects. May I know what is the code that make the registry reload without rebooting Windows? Or may like the...
9
2978
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) pickle an object that inherits from "AutoReloader" 2) unpickle the object 3) modify one of the pickled' object's derived class methods 4) reload the module holding the class
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10448
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
10217
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...
0
10003
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
9046
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
7544
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
5440
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...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
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

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.