Hi I have this question
I have a list of link-image and I want that whan I click on a image
this image change .
I use Jquery.
My javascript code in the view is:
The list is :
<ul >
<?php foreach ($images as $image): ?>
<li>
<?php echo $html->link($html->image($image['Image']
['url'],array('id'=>'image'.$image
['Image']
['id'])),'javascript:void(0);',array('onclick'=>'load_image('.$image
['Image']['id'].')') ,false,false); ?>
</li>
<?php endforeach; ?>
</ul>
The load_image function is:
echo $javascript->codeBlock('function load_image(id_widget)
{
$("#image"+id_widget).attr("src","http://www......../
new_image.jpg");
}
');
But it doesn't work
Instead of showing the new image I get that the old image is
disappeared.
Can you help me?
Many Thanks
Marco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---