$(document).ready(function(){
     $(".imageLink").click(function(){
        $("#hidden").attr("src",$(this).attr('href'));
         var href = $(this).attr('href');
                 window.open('popup.php?img=' + href + '', 'packpilot',
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,'
+ this.id + ',left=150,top=150');
                 return false;
      });
});

<a href="/img/uploads/{$products[item].ver_daten.ver_bildname}"
class="imageLink" id="width={$products[item].img_org_width},height=
{$products[item].img_org_height}">
<img src="/img/uploads/{$products[item].ver_daten.ver_bildname}"
id="hidden" border="0" width="{$products[item].img_display_width}" />
</a>

this way it works.

On 16 Dez., 12:53, heohni <heidi.anselstet...@consultingteam.de>
wrote:
> Hi,
>
> a list of database items, each item has a picture which I want to open
> onclick as popup.
>
> <a href="javascript:void(0);" class="product_popup" name="id_123">
> <img src="/img/uploads/article_123.jpg" width="100"
> id="bigimage_id_123" name="width=400,height=200" border="0" />
> </a>
>
> my jquery:
>
> $(document).ready(function(){
>         $("a.product_popup").click(function(){
>                 $(this).click(function(){
>                         var ver_id =    $("a.product_popup").attr("name");
>                         var img_name =  $('#bigimage_id_'.her_id).attr("src");
>                         window.open('/popup.php?img=' + img_name + '', 
> 'Produktfoto',
> 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,r­esizable=no,'
> + this.name + ',left=150,top=150');
>                         return false;
>                 });
>         });
>
> });
>
> But is doesn't work at all :-(
> I can catch only the first ID in the list, not just the explicit
> clicked item of the list.
> And I do not get to the image src :-(
>
> Can anyone help me?
> I don't know what I made wrong....
>
> Thanks in advance..

Reply via email to