Opener.location.reload()
Dec 10, 2002I use this in my code :
opener.location.reload();
This works well in Internet Explorer and not in Netscape....
I use this in my code :
opener.location.reload();
This works well in Internet Explorer and not in Netscape....
I have a popup that contains a form. When I submit that form, I need 1) the data to get saved into my database, 2) the popup to close, and 3) the parent window to refresh and display the updated data.
I found the following code in an old thread, but the parent window still shows the old data after it appears to reload. The data is saved in the database, but the parent window only shows the updated data when I manually refresh it by hitting F5.
Code:
<form action="process_form.php" method="post" onSubmit="window.opener.location.reload(true); window.close();">
Is there a difference between right clicking an iframe and reloading post reponse vs. using javascript to reload the frame? So far, the javascript route hasn't worked for me. [some context] I am writing a little bookmarklet to help me with the online registrations at my school. Here is the setup.
Load up a page on the domain. Remove all body elements. Insert an iframe. Set iframe to page for class roster search. (in iframe on school search page) Select class search options, POST the form data, and view results in frame. *This works perfectly, but I need to have it refresh results every minute or so. When I use frame.contentDocument.location.reload(true); the frame loses the post data or something and the page is broken. BUT when I just right click on the frame and select "reload frame" it works perfectly. What is the difference between rightclicking the frame and refreshing it like that vs. using javascript to reload the frame?
Code:
<html>
<head>
<script type="text/javascript">
function closeWindow()
{
window.opener.location='www.gafarrons.org'
[Code]...
the error message is "window opener is null or not an object"
We have a micro site that is getting opened inside a popup window from
some external main site (the domains of our microsite and main site are
different) ...
I need to support the following functionality: After the user is done
surfing the pages on our site and user clicks the close hyperlink
(present on top of all of our webpages), the opener window's location
needs to be reset to some given URL ....
I had a small javascript code for this, where i have written:
window.opener.location.assign("<url>"); .
My problem is that this line of code is throwing an exception saying
"Permission denied to access method location.assign" ...
Can anybody help me and let me know why am I getting this exception?
and how to overcome this problem?
I have a inventory control program written and I use
window.opener.location='filename.html' window.close()
It works fine in ie6 on windows 98 and XP home but sometimes for users with XP professional it crashes ie6 (wants to send a error reports to microsoft and the closes)
I was wondering if it could be that professionals "mutil" processing causing a problem by 1 process excuting before the other?
I am trying to use the window.opener.location code from a link on my popup window to change the webpage in the window that opened my popup. It works on ie/firefox, but doesnt work on safari.
function changepage(id) {
window.opener.focus();
//window.opener.location('http://www.mysite.com/index.php?id='+id);
window.opener.location.pathname = 'index.php?id=' + id;
self.close();
return false;
}
Now i've tried the link with both <a href="#" changepage(35);"> and <a href="javascript:changepage(32);"> but safari doesnt want to touch the opener page. Do you know of any workaround/hack to get this to work? If not, is there a way to check to see if the user has safari and change the code to opening the page in a new window?
Here is what I have: a regular main window that opens a small pop-up for preview purposes. This pop-up window has a text link to close it and a text link to close it and reach a page with more detail in the main window. I have been trying an infinite number of things so far and I cannot get this last link to work in Opera 10. All workarounds are just fine in FF 3 and IE 8. Here is the function called when clicking the link to "close and go":
[Code]....
I have a real problem with an e-commerce site which has worked for years without a hitch but with the uptake of IE8 (it seems) this problem is getting more and more frequent Problem: customer continues through checkout on main site (http:[url]....).
When they have to enter their credit card details, they click on a link to open a window (https:[url]....). The details are verified and if valid, the customer is returned to the confirmation page in the parent screen (http:[url]....) and the payment window is closed . Pop-up blockers are causing problems here but even when pop-up blockers are disabled, the confirmation page loads in a new window.I'm using :
<script language="JavaScript">
<!--
window.opener.location="<?php echo ($main_url);?>thanks.php>";[code].....
But the page always loads in a new window and not the parent window.Is there any way to load the confirmation page in the parent window?
I have a real problem with an e-commerce site which has worked for years without a hitch but with the uptake of IE8 (it seems) this problem is getting more and more frequent. Problem: customer continues through checkout on main site [URL] When they have to enter their credit card details, they click on a link to open a window ([URL]). The details are verified and if valid, the customer is returned to the confirmation page in the parent screen ([URL]) and the payment window is closed. Pop-up blockers are causing problems here but even when pop-up blockers are disabled, the confirmation page loads in a new window.
[Code]...
In phase of my deployment I send the user a window from a servlet and inorder to communicate with an applet already loaded in another window in the browser I thought I could set the window.opener.location="${formbean.property}"; and it partly works, it get set, I see the new window flash, but it then executes that url. Two questions?
1. setting the window.opener.location in an onLoad() should not force a post back to the server, correct? I am just trying to keep that window I want up there and set an internal property so I can access the applet in the other window. Trying to make this "synthetically" a child of that page opened with the applet so I can call the applets methods simply.
2. Is there another way for a new browser window to directly access an applet in another page? I could go the route of making a probe applet and hoping they share the same JVM, (JRE1.6.0.25) access it that way. Is/how that the way to do it?
I'm popping a window to a page with a different dns than the parent, and
i want the opener's location reloaded when this window is closed.
With Mozilla it seems that all the opener's methods and properties are
protected because the dns are different. A security exception
(permission denied) is thrown every time i try to exec an
"opener.location.reload()" from the pop up window.
An alternative would be catching the window closing from the opener, but
i don't know how this could be done.
I'm having a hell of a job getting this to work in Safari: the only thing I can think of is that one can't use reload() across to another frame for security reasons. Does anyone have a concrete answer or solution for this? I'm trying to do this:
top.frames["mainContent"].location.reload();
I am trying to use the onclose function on phatfusions multibox in order to refresh the parent window when the multibox is closed. The problem I have is that as soon as I load the page it gets stuck in a loop. The code I am using is as follows
Code:
var box = {};
window.addEvent('domready', function(){
box = new MultiBox('ab', {descClassName: 'multiBoxDesc',onClose:location.reload(true),useOverlay: true});
});
i am invoking window.opener.location.reload function from a pop up window to reload the parent page. But this seems to behave randomly. Sometimes the reload would preserve form data eg. the state of the drop down lists. On some other occasions, it would reset all the drop down lists and form data. Does window.location.reload resend form data to the server?
View 1 Replies View RelatedI'm using window.showModalDialog but having an issue trying to set the parent window(main browser). I open modal window A which is then opens modal window B, top of modal window B onload I do window.opener.close()". My issue now is when i'm finished with B I set parent window(main browser) to a new url with window.opener.location. So my problem is modal window A the parent has been closed so window.opener.location will not work.
View 3 Replies View RelatedI have an iframe somewhere on my page. Now on click of a link, I would like to show it in a different location on the same page, BUT I don't want it to reload again. I've tried this simple method but it doesn't do it because the iframe reloads in its new location.
<script type="text/javascript">
function move(what, where)
{
document.getElementsByID(where).innerHTML = document.getElementsByID(what).innerHTML;
}
</script>
[Code]...
Code:
<a name="loc"></a>
<a href="#loc" onClick="document.location.href='#loc'
document.location.reload(false);return false">Click here to go to your location</a>
When you click onto the link you should go to the page location marked by the anchor tag "loc", however, upon clicking you go to the top of the page and never redirected to the exact spot where your anchor tag is located. Why is that? I'm using IE6 (per requirement) as my platform.
I wonder why firefox won't work with this script below, but it works on IE, Safari, and Chrome instead?
Code:
$(document).ready(function(){
$(window).resize(function(){
location.reload();
[Code]....
The reason to reload the page is to reload the google map when the window is being resized.
Here is the link to look at, [URL]
I see how the window.opener works, pretty neat in that the pop window
knows the parent.
Is there a property that also knows the form field parent?
My function does not know which of the 3 select menus called it.
What can I do?
function onCarrierSelect() {
//
var frm = document.carrRequestForm.carrierList.selectedIndex
var selectCar =
document.carrRequestForm.carrierList.options[frm].text;
alert(selectCar);
if (window.opener && !window.opener.close)
window.opener.document.form(x how make global?).nbcarrier(x how make
global?).value = selectCar
window.close();
}
p.s. as an aside I know the form field name, it is literally in the
querystring, but that is ASP/vbscript and no way to get it into the
jscript function...
"top.someFrameName.location.reload();" doesn't work for Netscape 7 (it
works for Netscape 4.75!).
Any idea how to fix this.
I have a simple product display with an product image. The product image changes with ajax when i click in a dropdown menu on another color.
Now i added the (beautiful) zoom script cloud zoom. It just works fine but after i click on another color and the product image reloads the script does not work anymore. instead my <a> is just a normal <a>.
This is the part that reloads at all:
How can i reload the function when this part reloads? Or what else could i do?
Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.
Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.
I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?
If i open a link either by using the right mouse menu "open in new window"
or press shift (IE) on the link the page will be opened in a new window.
From this window I can use the window.opener object to access the opening
window.
When doing this in NN7.1 I cannot access windows.opener. If I open the
window with window.open I can also use the window.opener to access the
opening window but not if I open the new window by pressing CTRL an clicking
the link or using right click "Open link in new window".
Is it only possible to access the window.opener if the window was opened
with window.open in NN7?
I have a normal window cotaining a form (named form1). The form has a text
input called imageURL. There is a button that, when clicked, opens a new
window that contains three frames (left, right and bottom.) In the right
frame is another form (named form2) with a hidden input (selected). When
form2 is submitted, I want the value of selected to be passed back to the
imageURL on form1 and then close. The code I have tried is as follows:
(From my frame...)
<SCRIPT language="JavaScript">
function passValues()
{
// pass variable back to parent window
window.opener.document.form1.imageURL.value =
document.form2.selected.value;
}
top.window.close();
</SCRIPT>
It closes just fine, but imageURL on form1 never changes.
I have just created an 'open window' function for an animated page. It opens the current animation from the current page into a new window, and lets the user change the 'opener' animation while the new animation in the new window continues, sychronised with the opener.
As the opener contains the clock for sychronisation, I can only use the animations from that page (and I have a few pages of small animations). I can let the new animation on the new page continue with its own clock if the opener is closed, but what I would like is if a new animation is started from a new opener, then it tells the existing opened window the new page speed...
got it?????
trymy rhythm pages
follow steps.....
1; open new window
2; click on drum in new window to turn on
3; start rhythm by clicking on hands in main window
I can change between rhythms, so long as I stay on the main page. The problem is when I change the main page to go to other rhythms I loose the sychronisation.
I can go to another page(from opener) and put a new rhythm in the current new window, but I would prefer to keep the old rhythm and sychronise.