<div class="crd_downloads_entry_title">
Koi<br />
<a href="<?php echo $root ?>downloads/jtemplates/koi/koi-j16template-1.0.zip" >
<img src="<?php echo $root ?>images/btn_download.png" alt="koi" title="download"/>
</a>
</div>
I need to write a jquery code which when someone clicks on the download link a php function starts to add one download to that file in the database.The php function is ready and correct.
This is my jquery code
$(".crd_downloads_entry_title>img").click(function ()
{
$.ajax({
url: "<?php echo $root ?>utils/add_download.php?softid="+,
async: false
});
});
There something missing in the url, I don't know how to select each time the correct "alt" attribute from the img tag because there are several of those enrtries in my page, all differ only for the alt attribute in the img tag.The alt attribute is the code of the file which I need to pass to the php script to update the correct entry in the database.
How do I select that attribute accordingly to the user's click?


Sign In
Create Account


Back to top









