I see this problem in IE but not Firefox. I have a page that opens a second page as a dialog box. If the Dialog is relaunched from a second instance on the page the Dialog window is reused, the controls are reinitialized but window.opener still refers to
the original opener. I have simplified code than demonstrated the problem. Code:
I have a screen which has in the corner a cycling list of 10 or so images .. fadeIn / fadeOut to that they are continually cycled through in a loop - one change every 4 seconds. It works perfectly except when the page is minimised or a different browser tab is selected. When I return to my screen, some time later, it is as though the cycling animation has been waiting - in suspended animation - and it flies though the images at breakneck speed till it's caught up with itself. I have experimented with .stop() without success. Is there a standard "fix" for this situation?
I am trying to usw window.open , upload a file in the child window and then referesh the parent window. But once upload is done, window . opener .location.href or opener.location.replace sends a message back but I get a pop up blocker, so if I turn pop up blocker off, it opens in new page. I just want the parent page to refresh on the same window. This works on some employees stations but not on others..I don't know if there are any settings on IE that need to change, I tried everything...weird. does any one done this before?
I'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.
Firstly I know this issue has been addresses a lot already but as a newbie to HTML and Web Development I am unable to get the idea. according to documentations and solutions proposed on different forums a popup or child window can be only closed using window.close() if it is opened via window.open() function.
I have a form that is in a popup window. I need the form to submit to the opener window. Is is possible to do that? The opener window is the main window so it is does not have a name and there are no framesets.
<form action="something.php" method="post" target="????"> I'd like to use window.opener in the target but that's JavaScript...
I know somebody has done this before and has the code.
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...
I am new to JavaScript but until now, have felt my way along fairly successfully. I have a page showing an image to the user. I use window.open to open a separate page, listing a bunch of different images that the user can select. When the user clicks "Submit", I'd like the image selection page to close and update the image on the originating page.
To "play around" with this command until I can use it successfully, I wrote the following;
function Button1_onclick() { window.opener.document.bgcolor='bisque' window.opener.location.reload() window.close() }
The line for changing the back ground color to bisque I pulled from the netscape site javascript reference for Window.Opener.
I'm trying to accessing the Parent window fom a sub window previously opened using window.open.I'm using firebug to t yand debug, and it shows that this DOM entry exists..window.opener.location.href.But trying to access it gives "window opener is null" error.I've tried all these, and get the various errors tagged on the end...
<script language="JavaScript"> //alert(opener.location); // = opener is null //alert(opener.location.href); // = opener is null[code]......
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.
The use of jQuery below does not work for IE9 but works beautifully for Firefox, Chrome & Safari. Before I rewrite it without jQuery, I was hoping to get some feedback on what I've done. Not certain about standards compliance, just know it works fine for all the browsers I'm testing except IE.The user provides an action from a popup window. The action references the opener window, removes a few elements from a hidden element and then immediately repopulates those elements with updated values based on that action.
Code JavaScript: // does not appear work like this in IE9 window.opener.$('div#hiddenShiftAbbrList').empty();[code].....
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?
The innerHTML and style.display of the above works. Both col?? and row?? can be targeted and changed. However the img?? does not work. The ID on the tag is fine but the image wont change. Incase it was src I tried with style.display too on the image but still wont target it.
I have a problem that drive my CRAZY! It's about a popup with opener window.
I can't submit the data from the popup window to the opener window. In Mozilla works just fine but when i try on IE 7 the form won't submit. Here si the function!
function copyForm() {
window.opener.document.getElementById('form_name').submit(); //i've try also opener.document.getElementById('form_name').submit(); //and also window.opener.document.form_name.submit(); window.close(); return false; } What i must do to make this code work in IE???
I am trying to use window.opener to grab some innerHTML of and ID in the orginal window. It works great in may tests going from HTML page to HTML page. I need it to work from and HTML Email in Outlook as the opener window. I receive the error that "document is null or not an object". Is this not possible? HTML in Email...
I have a problem that the window.opener variable is lost once my popup page has a postback. On multiple pages they address this problem but I cannot find a correct answer.
This is my situation:
I have a main page which shows invoices. When a user clicks on the invoices they get a popup where they can alter the invoice which uses postbacks because of direct changes in the database. Finally the user can click a button to accept the invoice and then I need to change two variables on the main page which opened this popup, the new invoice fee and status (which is based on the button pressed). I dont want any postbacks on the main page, therefore I simply want to pass these two variables from the popup to the main page.
However, after a single postback on the popup page the window.opener variable is gone and lost forever. Now I have seen solutions using frames but I do not know how to go from there because I also pass some variables from the main page to the popup.
In that poupup window, the user loads a number of different pages (by submitting forms and clicking on buttons), some of which are in a different domain. But eventually, the user comes back to a page that is in the same domain as the page in the main window.
On this page, I'm trying to execute the following script:
Yes, there is a form on the page that has been sitting in the main window this whole time. However, I'm getting an "access denied" error. Any thoughts?
I'm creating an html-based kiosk for a museum exhibition. It's a page-turning exhibit, so visitors to the museum will be able to turn the pages of a document. The monitor will be a touch-screen and the main browser window will be set to fullscreen, so the user will not have access to any browser features.
All the pages are built and work. My problem is that I want as many users as possible to see the homepage when they approach the kiosk (not the page the most recent user was last looking at). So I'm working on a way for the main window to redirect itself back to the homepage.
The solution I'm trying to make work is this:
When any page is opened (besides the homepage) a timer script runs. When the timer reaches 0, it activates a script that creates a new popup window that says, "Click here to continue reading from the current page." If someone clicks the popup, it goes away and leaves the main page beneath. If no one clicks the popup, it also goes away, but in this case, I need the main window to redirect to the homepage--this is the part I can't figure out.
I think (and I'm new to this so I'm probably wrong) I want an onunload action related to the popup window, so that when the script closes the popup window it will access the main window and change its location. Can this be accomplished with a window.opener in the popup script?
I've tried to do this by putting on onfocus action in the body tag of the main page, to redirect when the main page is put in focus. But in this case, the onfocus action executes when the main page originally loads--I need it to execute when the page is "refocussed." Code:
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.
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?
My parent window is dash.html. From this i call a pat.jsp file which is a child window to dash.html. I wrote a function in dash.html
function feed_refresh(){ getGlaceCompleteDashBoardResult(1); }
this function getGlaceCompleteDashBoardResult(1); is included in a .js file in dash.html file. Now from the pat.jsp i call the feed_refresh() function on onunload=db_refreshfeed(); like this.
var db_refreshfeed = function(){ if(REQUEST_TYPE) window.opener.feed_refresh(); }
This code working nice in IE but in mozilla it throws uncaught exception.
I have a window with a form that is accessed directly. I would like to pop open another window from it and make the new window the parent/opener. I've tried the following but I keep getting 'opener is null' after trying to access the new parent's Javascript methods.