Register  |  Login

Question Details    

   Question

Time: 05:48 - Oct 02, 2007     Asked by: john2      Status: Answered      Points: 75   

How do I have my website links pop up in a new window without being blocked by pop up blockers?

I have a website and I want to put some links in the site that refer to another website, but I dont want the user to leave my site while having the opportunity to view the other site. I implemented the following:

<a href-'link.html' target='new'>My Link</a>

but when it actually shows on the site, every time I click it my Google pop up blocker doesn't allow me to view the site. I know I've been to other sites where I click on the link and it opens in a new window, and those are not blocked by the pop up blocker. Does anyone know how I can accomplish this with simple HTML?

Ask a New Question

Become a Quomon Expert

Current Categories

 

Similar Questions


   

Answer Discussion
Answer Discussion
Answer Summaries
Answer Summary
 
have u tried using javascript to see if that makes a difference?

get your hyperlink to call a js function

<a href="javascript:showpopup()">my link<a>

and your js function would have something like this in it

function showpopup()
{
 window.open ("http://www.bbc.co.uk","mywindo...);
}


alternatively, if that doesnt work, open up a blank page then write your html code in there which automatically loads the page of your choice

function showpopup()
{
window.open ("","mywindow1","status=1,width=350,height=150");
document.write('Generate Your Code Here');
}


sample code you can use to generate - just check this out
http://www.tips-tricks.com/automa.asp


Expert:

nidhi

Date:

Oct 08, 2007

Time:

07:14

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Nidhi,

That first function that you gave me doesn't seem to work. It is giving me an error, it is telling me that an Object is expected on line 1, character 1.

J

Expert:

john2

Date:

Oct 11, 2007

Time:

03:50

 

Votes: Good (0) | Bad (0)
Login to rate this answer

John,

I think you were really close in the code snip you posted. I've had most of my success using the following without it being destroyed by "most" pop-up blockers: <a href="http://www.castagna.net" target="_blank">Castagna.net web site</a>

Let me know if this works for you...

Take care,
Ric

Expert:

rcastagna

Date:

Oct 11, 2007

Time:

08:28

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Thanks Ric,

I think that it worked. I'll let you know if I find out otherwise.

J

Expert:

john2

Date:

Oct 11, 2007

Time:

08:52

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Hi John, I see you got the problem resolved now

regarding the code though, not sure whats going wrong there, I cut/pasted from my sample
We could do with some <CODE> style tags so it doesnt interfere with any sample html code posted

<HTML>
<head><title>js popup quomon example</title>
</head>

<SCRIPT LANGUAGE="JavaScript1.2">
function showpopup()
{
 window.open ("http://www.bbc.co.uk","mywindo...);
}
</SCRIPT>

<BODY>
<H1>JavaScript Popup Example</H1>
hello
<A HREF="javascript:showpopup()">my link<A>
</BODY>
</HTML>

Expert:

nidhi

Date:

Oct 12, 2007

Time:

14:40

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Question Answered

This question has been answered, and points have been rewarded to the following experts:

nidhi: 10
rcastagna: 65

You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for this question by clicking on the "Answer Summaries" Tab.

 
No summaries have been submitted yet. Want to be the first?



Respond to this question:

New User

  Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:


Forgotten Password

 

New User

  Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:


Forgotten Password

   

"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it


All Questions


Language Options

English:

www.quomon.com

Español:

www.quomon.es

Sponsors

Questions and Answers Software
Real Estate Postcards
Marketing Fulfillment