Target Blank And Close Popup Window?

Sep 18, 2011

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

<a href='http://www.myurl.net' onclick='window.close();' target='_blank'>
<a href="http://www.myurl.net" target="_blank" onClick="javascript:window.close()">
<a href="http://www.myurl.net" target="_blank" onClick="javascript: setTimeout(window.close, 10);">

View 10 Replies


ADVERTISEMENT

Open In New Window - Insert The Target="blank Tag But Can Not Seem To Get It To Work

Jan 21, 2010

I have a domain name registration field that links to a reseller storefront and then searches for that domain name. I would like the storefront to open in a new window, instead of the parent window. I have tried to insert the target="blank tag but can not seem to get it to work. Is there another way to make that window open? You can see the page and field here: [URL] The field is on the left side, just below the center of the page.

View 6 Replies View Related

Link To Page Using Target Blank & Linking Page's Window Location?

Feb 16, 2011

Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:

Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>

This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).

why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.

View 2 Replies View Related

"window.close()" Won't Close My Popup Window In Most Browsers

Apr 7, 2010

- 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.

View 5 Replies View Related

Cannot Close Popup Window After Submit

Jan 22, 2007

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>;

View 4 Replies View Related

Waiting For A Popup Window To Close

Jul 20, 2005

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.

View 2 Replies View Related

Redirect / Close Popup Window

May 4, 2011

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"?

View 6 Replies View Related

Popup Question: On Popup Have One Button To Close And Another To Close And Then Redirect To Another Page

Jul 20, 2005

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.

View 4 Replies View Related

Refreshing To A New Page Via Popup Window Close

Dec 8, 2005

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?

View 7 Replies View Related

Close Popup When Lanching Window Unloads

Jun 10, 2002

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:

View 1 Replies View Related

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).

View 2 Replies View Related

Close Popup Window After Submit Then Redirect To Parent

Aug 18, 2011

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.

View 6 Replies View Related

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?

onmouseup="window.open("

View 1 Replies View Related

Close Internet Explorer Window Without Warning Popup

Nov 15, 2009

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.

View 5 Replies View Related

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.

View 2 Replies View Related

Add A 'blank' Target To Any Links That Have 'external' Specified In The REL?

Mar 11, 2009

I am using a JavaScript to add a 'blank' target to any links that have 'external' specified in the REL. This is working great, but on some of the links, I need to give the user the ability to click the surrounding <li> item as well.

So my regular link looks like this:

<li><a rel="external" href="http://www.google.com">Google</a></li>
I need to figure out how to add the REL to the onclick in the LI
<li onclick="location.href='http://www.google.com/';"><a rel="external" href="http://www.google.com">Google</a></li>

[Code]...

I can't seem to find any instructions about how to insert this REL option....

View 6 Replies View Related

JavaScript Popup On Window Close: Works Great On IE, Works Terribly On FF

Dec 13, 2006

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.

I have window that pops up with our commerce system. I have it set to pop up a window via JavaScript if the visitor quits early in the process (abandons the commerce system before completing all of the steps. The new popup is just a customer survey ("why are you leaving, is there something else we can help you with" etc. etc.).

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.

Again, here's the two JavaScript routines that handle clicks on the graphical close button and on the window 'X' close button. Code:

View 9 Replies View Related

Creating Popup Windows - Add A "Close Window" Button On Survey.html Page

Mar 13, 2010

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?

View 1 Replies View Related

<form> Target Won't Target Window

May 19, 2011

i want to submit form data from the popup window, close the popup, and load in the main window. problem is, it always opens a new 'tab'. i'm using google chrome, i didn't think to try this in

in the <head> of the 'main' window:
<script language='javascript' type='text/javascript'>
window.name='main';
</script>

[Code]....

View 4 Replies View Related

User Can Close The Browser Or To Open The Window Browser Without Or With A Disable Close Window Button?

Apr 5, 2009

I need to know if the user close the browser or to open the window � browser without or with a disable close window button How can I???

View 6 Replies View Related

Trap The Window.close() Event When The User Clicks On The Close Button Of The Browser

Jul 20, 2005

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 ?

View 1 Replies View Related

Popup Box Target

Oct 6, 2005

I'm really weak at javascript,so i need some help here regarding popup boxes.
Currently,i have a file called main.htm, and when i click on a link it will bring me to my popup page called popup.htm,which is populated with buttons (say alphabets a-z). What happens is that when i click on any of those alphabetical buttons, say 'a', the letter 'a' will appear on my textarea that is in my popup box. However,i want it to appear on the 'main.htm' popup box instead. Is that possible? How do i do it?

View 3 Replies View Related

Child Window Close Event - Opening Another Link In A Separate Window Using Window.open()

Jan 29, 2010

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.

View 4 Replies View Related

Write To A Blank Window?

Mar 9, 2011

I have this code and was trying to modify and not sure what i got wrong..

Getting error object expected ")"????

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>

[Code]....

View 2 Replies View Related

Popup Box That Won't Close

Jan 20, 2009

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.

View 4 Replies View Related

Close PopUp On OK.

Oct 9, 2005

Any idea on how I could close this popup when the user clicks OK?

function updatedPopUp() {
echo "<script type="text/javascript" onclick="window.close()">alert('Summary updated! Thank You.')</script>";
}

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved