Open A New Window And Close The Current Popup In One Click?
Nov 21, 2010
Here's what I have so far, it doesn't work:
HTML Code:
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.
In the onclick event I want to close the current window then open'ConfirmPage.aspx'. Whats the best way to do this? Can I close the first page then open the next, or should I be redirecting? If so whats the best way to redirect using javascript?
Basically I want some of the links in my page to open in new tabs (I'm using Firefox) or windows if the user has their options configured that way. And I want my page to remain intact as it involves some AJAX and takes a while to load.
But ...and this seems to be a big "but"... I don't want the focus to move away from the page I'm on. So techniques such as <a target="_blank"or <a onclick="window.open(...)"aren't working for this requirement. I even tried using a separate function and attempting to return to the original window straight after using the following function: Code:
to make a column clickable and then when clicked I need to open a pop-up window. I use the click event to get the data I need to pass to the new widow. This is working.
Then I use window.open(URL...) to open the window.
Now, I need to stop the information from the click event of the href from being passed to the browser. Is the href the proper way to do this or can I make it clickable via jQuery?
It does open a new page in firefox but generates an error in IE 8.
Is there a jQuery way to open a pop-up window that will work in IE and FF?
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.
create a link which has an OnMouseOver event, this event should open a popup window (but check first if a previous instance of this popup is open - if so, close it)
the link should also have an OnMouseOut event which would close the perviously opened popup.
I need a script that will open a new window (popup / new link) in a specific size, but will also close the old window (where the popup came from). I know the popup window is easy but finding a work-able close window script as the new window is opened is impossible!!
1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.
I have this script which I found bits-and-pieces and put together to display and close the popup. The problem is I couldn't figure out a way to close the popup by clicking anywhere on a page. I can close by clicking on the link but that's not what i want. I want to be able to click anywhere on a page to close the popup.
I am trying to dynamically open a popup window but ie8 blocks it with the popup blocker. basically within a ajax fuction I have a confirm button and if the user clicks yes it opens a popup window. now I tried it with a javascript function but it got blocked, so I have tried it by creating a form with a button in it and instead of calling the popup function direct I call document.form.button.click and in the form my button has onclick"popup('<? echo url; ?>')" but this also is detected as a unwarranted popup and is blocked.
now I understand that the popup blocker works when a popup is called without user interaction, but allows popups on say button clicks. how can I get the popup to work
- 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 3 links that are clickable... And what I want to do, is when 1 anchor tag is open and the user clicks on a different link, it closes the previous link and opens the clicked one. Here's a link to the working page to see my example: Example Site on Temp server The green buttons on the right hand image are the clickable links and these are the ones I want to add the final animation to. Click on one link, then click on another.
Can I get javascript to open a window and close it, without a user seeing it? Basically, I want to open a site, so it downloads and sets a cookie before I display a link for a user to click on.
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"?
I have a window open, let's say index.html. On the page I have a link that executes a javascript. I want the javascript to open file new.html in the same window that index.html was displayed in. How do I do this? Everything I try opens a new 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.