Button To Loose Focus After Close Of Popup Window?
Oct 21, 2009
I have an html button that calls & open another browser window on the onmouseup event, but once I close the popup new browser window my button has focus & is like selected.
I want it not to be selected or clicked or has focus, how do i loose the focus after close of popup window?
Is it possible for me to make visible a close button if the active window is a popup window or a new window (other than the main window)?
What I mean is this:
If the present window is the main window, then the close button should not be visible on the page. Otherwise, the close button should be made visible and active (i.e. can be clicked to close the window).
As per the rather long subject, I would like to (well, my boss would like me to...) on a popup have one button to close and another to close but then redirect to another page.
I read about window object and specifically about creating popup windows. The code below produces a popup window when a link is clicked:
Code JavaScript: var Survey = { init: function() { var surveyLink = document.getElementById("survey"); Core.addEventListener(surveyLink, "click", Survey.clickListener); }, [Code]....
I would like to add a "Close Window" button on survey.html page and when that button is clicked, the window would close. How do I do that? I know that I should use (reference to popup window).close(), but how and where do I attach even listener to that button?
I want to trap the window.close() event when the user clicks on the close button of the browser using javascript. Can anyone shed light on this problem ?
Ok so I have a site that I want to automatically close the window when the focus is lost from the page. For example, if the user clicks off the page to something else on there desktop I want the page to close. So far I have managed to do this but the grids on my page and the scroll bars all trigger the close function when clicked on. Is there anyway to make the scroll bars and drop down boxes not trigger the function?
- I have a button on my Flash site that opens an HTML page in a popup window. In Flash, I open the new window using Actiosnscript 2.0:
- Within the popup window are links to other HTML pages. They all open in the same window. I've been using the following to create the links in Dreamweaver:
- On each page, I have a "Return to Main Menu" button that should close the popup window. To do this, I have been using:
- The problem is that it works differently in each browser, and I can't even get it to consistently close the window in most browsers:
Internet Explorer = popup message appears, asking "Are you sure you want to close this window?" or something similar; window closes after clicking "Yes."
Safari = Only closes if I'm on the original HTML page. If I click on any of the other links (note that these all open in the same window), those pages' "Return to Main Menu" buttons cease to work. However, if I keep clicking "Back" until I get to the original page, it closes.
Opera = Button actually works for each page.
Firefox & Chrome = Does not close the window at all.
I looked into it and saw that others have used a window.opener to solve similar issues. But, since my popup window is opened using Flash/AS2, I need to find a way around it.
I've tried preceding "window.close()" with "window.opener=null" (i.e. -onClick="window.opener=null; window.close()"), but I don't think I'm doing it right because it still doesn't work.
I've also seen others use codes that involve functions and variables, but it is beyond my current coding knowledge to implement this. Like I said, I'm sort of new at this.
I have a page where it accesses the same popup a couple times. When I click 'Help' it opens the popup then goes to the section. But, if i go back to the other page, and click another link to the popup which goes to another section, it doesn't re-focus on the popup window.
The sections are accessed by the '#SECTION' link...
Code:
<a href="javascript:helppage('help.htm#Section','title');">Help</a> How can I focus on it when it goes to a new section when the popup is already open?
I have this ads on my webpage that popup whenever you go somewhere (obviously prett annoying ). So my question is: how can I make so the previous window I was at gets focus and the popup doesnt. My thoughts was on making it with the onLoad function after you popup the popup but its stops there.
I have a popup window that opens from a page on my website. This popup is a form with several fields. Upon submit button it redirects to a server side ASP page which writes all data to the DB.
I would like the popup to close immediately after the submit button is clicked, and data is saved, (or cancel button) - but this does not happen. The popup window remains open, even though I have a "return false;" after window.open in the onclick event.
What am I missing?
<a href="myurl.asp" 'title','toolbar=no,width=700,height=600'); return false;">post a note</a>;
I am currently having problems with Popup windows in an application I am writing. I have a page, which opens a Popup window to a Perl Script on another server.
Because of this, I cant access the Parent's DOM to execute a function on the main page from the popup. I need to execute a script in the Main window once the popup window has finished its process.
I have tried setting a loop that checks if the popup is still open, which should work in principle.... however it hangs both Browser Windows.
I am trying to do two things. I have PDF files but the user has to click on the icon and a contact form will come up in a pop-up window. That window has a form and once the form is completed and properly validated, I want the pop-up window to automatically close and go to "white_papers.com?download=1". It will do everything but it only goes to white_papers.com. How can I get it to go to the entire URL including "?download=1"?
The crux of the problem is I only know if the popup *has been* opened, but not if it *is* open. Therefore, the script doesn't know whether to simply refocus, or whether to popup a fresh window.
Are these the only solutions? * handle onerror in some creative way * hidden frames
BTW, I do have the luxury of ignoring non IE 5.5+ browsers on this project..
I am working on a ASP.NET application and have some forms that require to be popped up and let the user edit information on them. These windows must stay in focus until closed, but I have having some issues implementing this.
We are targeting IE explorers and have tried the showModal() which is exactly what we require (as it forces the user to the window till complete) but the page cannot refresh/postback which is what we need.
I also tried the on blur = self.focus() but that doesnt work either as when I user clicks the textbox on that popup to update a datagrid the focus is taken off the textbox and to the window again.
What I'm trying to achieve it a popup window that has focus until complete and allows the window to refresh as it requires use to update & delete a datagrid. Any ideas?
I have a popup window that has a "link" inside it, which needs to have a target=_blank but when ever clicked in IE, it stays inside the same window.I tried all of the following, none work
I was curious if such a thing is possible, I've seen it done before, but not exactly sure how that would work. Would it have something to do with the window.close (); function?
I have this page that a user uses to upload a PDF. I want a small popup to come up when they hit the upload button to promt the user to wait. This part is fine and works but I need the popup to close when the upload is complete. The way I have aproched it is to have a function that pops the window up: Code:
I am using a standard html <form> to send data to a pop up calculating somthing. I want all coming requests to go to the same window.
Quite easy with forms since we have the target attribute, thus target="calculating_window".
However future <form> submitted entries will appear in the "calculating_window" window, but keep behind the current active window (with the <form> formular). The user therefore cannot see new entries beeing calculated.
I tried working with a OnClick thing with the submit button and javascript focus(), but i just can't get i to work. Any suggestions?
as the title says, "close popup window after submit then redirect to parent". how do i do that? i google it and i saw that some people are using the following code:
window.close(); window.opener.location.reload();
The problem is, i dont know how to use and where them.
I want to close an internet explorer window without the warning popup. Im running ie 8 how would i do that cause when i use window.close() function it pops up with that warning.
I have a popup that submits a link. After the link is submitted, I want the user to be able to close the popup and go to the submitted link in one click. How can I do this.
I have my reasons for using popups, it's hard to explain. Please don't tell me how bad popups are, I know they're bad.
I'm generating a pop-up trough javascript wich is basically a window.open with some options...how can you force the user to have a window closed by a button instead of using the crosshair?
What I want to do is create a button, that when pressed, closes the window it is in, and launches a URL. The window the button is in is actually just a sub-page of the main website page, launched with target="blank", but I just do not want to close the window as I said, I want to launch a website address from it & have the launched from window close.
So please, walk me through this. Where do I place the:
<SCRIPT language="JavaScript"> ?
(Oh - this is thr right way, correct - case sensitive, right?)
Then what? I can create a button with the tutorials, but if you know, just write the darned thing for me please - I learned HTML mostly from copy/pasting.
AND... OK, now more complicated maybe (???). Actually this is more important than the above. This is from an application sub-page, the page opening with target="_blank". So the below is HTML that creates buttons. If the applicant presses the "submit application" button, at least when I press it, it launches O.E. and asks me if I want to send the filled-in text through O.E. to the email recipient. You know what I mean, right ? Well, I want the window the "submit application" button is in to do it's thing all right - submitting through the email, but I also want the page or window (I.E. or other?) launched from to close also.
We have a bit of a baffler as to why the Close X is not visible when using the Thickbox module.
Here's a live example of what I mean. Go to: [url]
Click on the Size Chart link next to the product's options. The popup comes up fine but unless the visitor is psychic they wouldn't know they have to mouseover the top right corner of the popup window to get the X for closing to display. The obvious problem is that the customers panic and close their entire browser after saying a few curse words.
We can't figure out why the X isn't displaying properly (basically not displaying at all).