Register  |  Login



Question

Status: Closed Points: 75 Time: 05:48 - Oct 02, 2007  

john2

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?

Answer Discussion
Answer Summaries

 

Q&A System for Websites and Corporate Collaboration

Advertisement

  • Generates significant organic traffic for websites
  • Saves companies money, resources, and time

nidhi

Date:: Oct 08, 2007

Time:: 07:14

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


john2

Date:: Oct 11, 2007

Time:: 03:50

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

rcastagna

Date:: Oct 11, 2007

Time:: 08:28

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

john2

Date:: Oct 11, 2007

Time:: 08:52

Thanks Ric,

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

J

nidhi

Date:: Oct 12, 2007

Time:: 14:40

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>

Question Answered

This question has been closed, 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 the Summary Area.

Answer 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:

Forgot Your Password?

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

Answer 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:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Websites Experts

View More

Rank

Expert

Points

1.

LAGM

900

2.

rcastagna

500

3.

oracleofDelphi

355

4.

nidhi

335

5.

PeterNZ

280

6.

multani.sarbjit

200

7.

jgivoni

190

8.

barun

75

9.

dustPuppy

75

10.

john2

65

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




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



Language Options

English:

www.quomon.com

Español:

www.quomon.es