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

Reload parent window & query

How do I reload a parent window that is part of a cgi script that has a query string?
I have a script that shows a record with images uploaded into a DB.
I have an image upload script (child window) which on close I would like it to refresh the parent window.
The issue is the parent window has a query string attached to the script name.
E.g.
Expand|Select|Wrap|Line Numbers
  1. http://www.mysite.org/cgi-bin/admintoy/dbedit_recccf.cgi?snumber=001&kit=BLOCK&id=BLOCK001&item_name=Bunny%20Builders&in_out=in&itemd_name=30%20Large%20molded%20plastic%20bunnies%20that%20fit%20together%20to%20make%20many%20things--good%20for%20older%20toddlers--young%20preschoolers&date_out=&date_in=&name_out=&staff_out=&photo=&staff_in=
I am using this code on the child window:

Expand|Select|Wrap|Line Numbers
  1. <SCRIPT language=JavaScript>
  2. <!-- 
  3. function win(){
  4. window.opener.location.href='';
  5. self.close();
  6. //-->
  7. }
  8. </SCRIPT>
  9.  
and this on the 'close' button of the child window:
Expand|Select|Wrap|Line Numbers
  1. <input type='image' src='/shared/purple/done.gif' border='0' alt='done' width='56' height='24' onClick='win();'>
I've tried using this:
Expand|Select|Wrap|Line Numbers
  1. <SCRIPT language=JavaScript>
  2. <!-- 
  3. function win(){
  4. window.opener.location.href='http://www.mysite.org/cgi-bin/admintoy/dbedit_recccf.cgi/$ENV{QUERY_STRING}';
  5. self.close();
  6. //-->
  7. }
  8. </SCRIPT>
  9.  
It reloads the parent window but doesn't preserve the query string.

Is this possible?

thanks
Aug 21 '07 #1
3 2063
acoder
16,027 Expert Mod 8TB
To reload the page, use
Expand|Select|Wrap|Line Numbers
  1. location.reload();
Aug 21 '07 #2
Perfect!

thanx
Paul
Aug 21 '07 #3
acoder
16,027 Expert Mod 8TB
You're welcome.
Aug 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Steve | last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is a better way to do this using more PHP code...... I setup a search screen for my database, the user enters data and submits...
1
by: Marshall Dudley | last post by:
I need to be able to allow a user to submit a form which opens another window. This part I have working. But after the submit, I need to delay and have the original window do a reload. I cannot...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
3
by: KathyB | last post by:
Hi, Been reading a LOT about frames, variables, etc. I realize you can NOT use server.transfer with target frames (which are client)... I have a Parent frame containing Left and Right frames....
2
by: Sonnich | last post by:
Hi all! Probably simple - once one knows. I have a window, which open using <input type="button" class="box" name="main" value=" Add... " onClick=window.open('add.asp')> The window has...
7
by: Raffi | last post by:
I'm facing a tricky (at least for me) page reload/refresh scenario and need some help. I'm working on a web application which is primarily used with MSIE. The application has a main window with...
14
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I tried a google search but could not find anything. I am trying to cause one webpage to reload when a second web page is closed. The second webpage loads data into a session variable and when...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.