Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

javascript - Fancybox opening hyperlinks in same popup window

I am using the fancybox iframe (as can be seen here in the iframe demo) http://fancyapps.com/fancybox/demo/

Here is the code i am using

 <p><a class="fancybox fancybox.iframe" href="items/item1.html"><span>Item 1</span></a>

I then have item1.html that has the following code:

<h3>Item 1</h3>
Blah blah blah text here
<a href="http://www.google.com"><img src="https://www.google.com/images/srpr/logo3w.png" width="160" height="25" border="0" alt="Google logo" /></a>

The fancybox pop up window works and pops up after clicking the items 1 link, however, once the fancybox is open and i can see the blahblah text and also the google logo, when i click the logo - the www.google.com should load but it doesn't. What am i doing wrong?

Thanks,

Daniel

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can't open goolge inside fancybox or in any other lightbox, check https://stackoverflow.com/a/8808761/1055987 for more.

Change it to any other URL, preferably one of your own.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...