Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
431 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...