currently I am working on a print button for images which are shown over an overlay. The button itself is already displayed, but I would need the link to the image. The problem is, that there are more links/overlays of this type and that I am really bad in javascript.
Also, the code from the overlay is at the very bottom of the site, so I would need to get the URL from above.
The code, which is clicked, looks like this (where .$largebild. is the url of the image from the database -> I have no access to it at the bottom)
echo '
<div>For the menu of the week click
<span class="zoom-enabled" zoom="<div class=\'overlayplakat\' id=\''.$largebild.'\' name=\'nameOfElement\' style=\'background: url('.$largebild.') no-repeat center center; background-size: contain;\'></div>"> here!</span>
</div>';
What I have planned is, that the script function should get the id, which is the url, where the name is the element which was clicked.
The problem of all that is, that it should be one function for the print button to know where it should get the link and print it like that:
<div id="overlay-print">
<a id="link" href="javascript:getImageLink()" target="_blank">
<i class="icons overlay-button-size"></i>
</a>
</div>
I thought there about parameters and probably a help function to identify which element was clicked.
I would be so greatful for help. If you need anything else, just ask.
PS: You should know, that I have posted the same yesterday, but yesterday I only needed one link which worked fine for me. Here is the link: Link for printing image
Aucun commentaire:
Enregistrer un commentaire