Checking For New Or Popup Window And Activating Close Button
Jul 23, 2005
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).
I read about window object and specifically about creating popup windows. The code below produces a popup window when a link is clicked:
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 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 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 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"?
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:
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:
(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).
I'm just restating my "site abandonment" post but with a clearer title as I realized it probably only made sense to me and me alone.
Here's the problem, it works fine in IE, but in Firefox, anytime the page in the original commerce window is changed, refreshed or advanced to a new page, the survey popup window is called rather than just on window close.
I am not sure how to get my Back button to work because when I click on it doesn't do anything, I either want to to do that or I want to be able to bring up this popup and have the previous page still up behind the popup. Does anyone know how to do that? Here is the code I currently have
I've searched Google etc. for ages! and cannot see resource on how to close the SuperBox model window via a button and/or a link from within the model - for example - within an iframe model.[URL].. I know there is the "link" at the top of the model which will close the model "window", but I would like the choice to close it via a button and/or link within the iframe model...
I have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.
The following will submit the form data to popup by clicking the submit button. I want it will submit the form automatically to the popup, there is no submit button in this page. Basically this page should not show up.
I'm using a script to make an overlaying popup window appear.It works great but you can't close it.Can anyone help me with how to add a something to make the window close? I have a little graphic of an "x" that I want to be able to click on and close the overlay window.