473,657 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I refresh target window?

hello all:

I have a pop up window is for the user to submit some information.
That window is refreched a few times with the user inputs (its a form
submit in itself... couple of times). I would like that window to close
after the user submits a rating and refreshed the original page that
opened the window.

I cant use opener.document .refresh because afterall the page isnt
considered the opener after the user posts the information on the pop
up window.

am i making any sense?

Oct 14 '05 #1
10 23707

si******@gmail. com wrote:
hello all:

I have a pop up window is for the user to submit some information.
That window is refreched a few times with the user inputs (its a form
submit in itself... couple of times). I would like that window to close
after the user submits a rating and refreshed the original page that
opened the window.

I cant use opener.document .refresh because afterall the page isnt
considered the opener after the user posts the information on the pop
up window.

am i making any sense?


Yes, but it is the same window, and it's the window that cares. At
least, in theory. :)

And it's reload, not refresh.

Give it a shot.

self.opener.doc ument.reload(tr ue);

Oct 14 '05 #2
nikki a écrit :
si******@gmail. com wrote:
hello all:

I have a pop up window is for the user to submit some information.
That window is refreched a few times with the user inputs (its a form
submit in itself... couple of times). I would like that window to close
after the user submits a rating and refreshed the original page that
opened the window.

I cant use opener.document .refresh because afterall the page isnt
considered the opener after the user posts the information on the pop
up window.

am i making any sense?

Yes, but it is the same window, and it's the window that cares. At
least, in theory. :)

And it's reload, not refresh.

Give it a shot.

self.opener.doc ument.reload(tr ue);


reload is a location method, not a document method.
And what the original poster needs, I am pretty sure he does not need to
reload the opener.

Gérard
--
remove blah to email me
Oct 14 '05 #3
Nop Not Working....

My code is (for the reference...)

On teh parent:

function newwindow(url) {
newwindow2=wind ow.open('','Cal lMePopUp','stat us=no,scrollbar s=yes');
var tmp = newwindow2.docu ment;
tmp.write('<htm l><head><title> </title>');
tmp.write('</head><body><for m name="formName" method="post"
action="calc.ph p">');
tmp.write('<inp ut type="hidden" name="prodh" value="bred">') ;
tmp.write('</form>');
tmp.write('</body></html>');
tmp.close();

tmp.formName.su bmit();

}

On the chiled:

function exit ()
{
//opener.document .form['new_entry'].submit();
self.opener.doc ument.reload(tr ue);
close ();
}

The quoted is the one I used before...

Oct 14 '05 #4
You are right... I really need to post some information to teh opener,
and THAN to reload it ... or better tu SUBMIT in it...

but I cannt... at least I dont know how...

Oct 14 '05 #5
si******@gmail. com wrote:
Nop Not Working....

My code is (for the reference...)

On teh parent:

function newwindow(url) {
newwindow2=wind ow.open('','Cal lMePopUp','stat us=no,scrollbar s=yes');
var tmp = newwindow2.docu ment;
tmp.write('<htm l><head><title> </title>');
tmp.write('</head><body><for m name="formName" method="post"
action="calc.ph p">');
tmp.write('<inp ut type="hidden" name="prodh" value="bred">') ;
tmp.write('</form>');
tmp.write('</body></html>');
tmp.close();
I think that will be a bit nicer as:

tmp.document.wr ite(
'<html><head><t itle></title>'
+ '</head><body><for m name="formName" '
+ 'method="post"> action="calc.ph p">'
+ '<input type="hidden" name="prodh" value="bred">'
+ '</form>'
+ '</body></html>'
);
tmp.document.cl ose();

tmp.formName.su bmit();

tmp.document.fo rms['formName'].submit();


}

On the chiled:

function exit ()
{
//opener.document .form['new_entry'].submit();
-----------------------------^

I take it you are aftert he *forms* collection?

opener.document .forms['new_entry'].submit();

self.opener.doc ument.reload(tr ue);
close ();
}

The quoted is the one I used before...


Untested, but shoule be OK.
--
Rob
Oct 15 '05 #6
si******@gmail. com wrote:
[...]
On the chiled:

function exit ()
{
//opener.document .form['new_entry'].submit();


opener.document .forms['new_entry'].submit();

----------------------------^
[...]

--
Rob
Oct 15 '05 #7
used: opener.document .forms['new_entry'].submit();

Still not working... the parent window is not refreshin or submiting...

Help please...

Oct 15 '05 #8
I have opened FireFox that gives a better JS concole... and I am
getting

Error: opener.document .new_entry.subm it is not a function
Source File:
Line: 47

Oct 15 '05 #9
SirShurf wrote:
I have opened FireFox that gives a better JS concole... and I am
getting

Error: opener.document .new_entry.subm it is not a function
Source File:
Line: 47


That means that the form new_entry doesn't exist as far as the function
is concerned (it may actually be in the page).

Try the following:

<html><head><ti tle>Child play</title>
</head><body>

<script type="text/javascript">

function newWin(url) {
newWin2=window. open('','CallMe PopUp','');
var tmp = newWin2.documen t;
tmp.write(
'<html><head><t itle></title>',
'</head><body><for m name="formName" action="">',
'<input type="text" name="prodh" value="bred">',
'<input type="submit">' ,
'</form>',
'<input type="button" value="Submit parent form" onclick="',
' window.opener.d ocument.forms[\'new_entry\'].submit();',
'window.close() ;',
'">',
'</body></html>'
);
tmp.close();
}

</script>
<input type="button" value="Open child" onclick="newWin ();">
<form name="new_entry " action="">
<input type="text" name="blah" value="afasdf">
<input type="submit">
</form>

</body></html>
--
Rob
Oct 15 '05 #10

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

Similar topics

6
11657
by: Baffin Shea | last post by:
Dear All, I am a beginner in javascript and looking for help, I put the following script in the original.asp: function NewWindows() { window.open("abc.asp", "new") }
5
1446
by: LL | last post by:
Hi, I have grid's col defined as HyperLinkColumn, I defined the Target as "_blank" to force open a new winodw. When the new window is closing, how to refresh the parent window? Thanks.
5
3567
by: Tmajarov | last post by:
Haven't been able to find a clear answer to this... I am building an asp.net application and trying to enforce some work flow by displaying a form via the showmodaldialog method. I can get the form to display, etc. But I want to refresh the content of the form displayed in the dialog window without navigating away from the form. For example... the showdialog method opens up a record to be edited. After editing when the save(submit)...
4
18755
by: Xerxes | last post by:
Hi, a newbie question: How can I refresh a page in a separate frame. For example, when someone logs in in the main frmae, I want to refresh another frame to display info differently. TIA.
8
9397
by: Jason S | last post by:
Hi, is there any way of getting my VB (6.0) program to automatically 'Refresh' an IE window that might be active (window status not applicable). It needs to be able to determine which active IE window to refresh, based on its caption. For example, there is a web site that I want to keep active where I normally have to refresh it manually before it times out (every 15 min or so). I might be doing something else at the time so I don't...
6
4200
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 assume it's not a clean solution. ParentWindow:
1
2282
by: Wolf Grossi | last post by:
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.
1
4871
by: helraizer1 | last post by:
Hi folks, and folkesses. I have a piece of java script for a dynamic menu (code below). <ilayer width=100% height=50 name="dep1" bgColor="#000000"> <layer name="dep2" width=100% height=50> </layer> </ilayer> <div align="center" id="describe" style="background:#efefef;" onMouseover="clear_delayhide()" onMouseout="resetit(event); refresh();"></div>
35
3402
by: Kaante | last post by:
Hi, i want a frame on my website to display one pic if the user has new messages and another different pic if it dsnt. Before i used html to auto refresh page every 10 secs. that was annoying for the user. as the user could notice the refresh and the images used to flicker. i found out that AJAX could perfrom the refresh for me better hence i tried using that. but the frame dsnt refresh automatically, but it does display correct info...
0
8384
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
8302
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
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
8718
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
8499
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
4150
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
2726
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
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.