| Issue 465: | Click image in iframe, opens outside iframe | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
I have searched for a while but couldnt find a solution. I have an iframe on a page (the client wants it, don't blame me) In that iframe i have a gallery and when i click on the thumbnail to view the picture, the picture opens inside the iframe. (ofcourse) Is there a possibility to open the picture outside the iframe? Maybe a forced way (dirty trick). Would be very grateful if there is an option to have it like that. For a live preview you could navigate to the url. http://bit.ly/dyYTBL Best regards Dave
Apr 22, 2010
#1
studio25...@gmail.com
Apr 22, 2010
to do so: include nyroModal (and all needed files for it) in the parent iframe. Then, in your iframe, you should bind you links to do: - Copy all links with the same rel attribute in the parent frame - call nyroModalManual on the link you created you want to open (ie the one who was clicked) I don't have time to provide all the code for that, but the idea is here. BTW, why are you stick with iframe?
Apr 22, 2010
Okay... i thought i allready made a manual on the 'click'
i have this paced in the template file of the gallery, which is located in the iframe:
<script type="text/javascript">
parent.jQuery(function($){
$('.nyroModal').click(function(e){
e.preventDefault();
$.nyroModalManual({ url: $(this).attr('href') });
return false;
});
});
</script>
The thumbnail i have to click to open the picture looks like:
<a href="fotoalbum/{urlpicture}" <? if($mgConf['lightbox']){?>rel="gal[serie]"
target="_blank" class="nyroModal"<? }?> title="{captionpicture}" id="manual
mgImage{cycle}"><img class="foto" src="fotoalbum/{urlthumb}" border="0" ></a>
But this doens't brought me to an outside view of the picture.
It might be possible that i misunderstood what you mean above. But i thought my
solution is the same as you discribed.
Just to exclude mistakes, this is the structure where the gallery is hiding;
index.php: where the iframe is.
Button Gallery: opens gallery.php inside the iframe.
gallery.php: i have this include <?php include("fotoalbum/gallery.inc.php"); ?>
I will play with it again right away as my client just called me to go online this
evening :S
I am also not a fan of iframes. But my client wants make use of continuously playing
music from a mp3 player. I have also tried ajax based pages without pageload. But
unfortunately my cms system which provides news articles, can't handle ajax. there
are some possibilities for ajax pagination, but some how it's not working.
So that why i choose for the oldschool iframe. A shame, but there seems to be no
alternative for it.
Apr 22, 2010
The code you mentionned isn't what I said. You have to create new DOM element in the parent page (your index page) corresponding to all the links of the gallery, and THEN, trigger a nyroModal function on the one you want to open.
Apr 22, 2010
ok, thanks for your time. Let's see if i can make it work... I know what you mean, not sure if i'm able to create it. Wish me luck! :) I'll get back here to report |
||||||