0
I need to send a value through a link to another page:
<li><a href="" onclick="getPasta()" id="icons"><?php echo $this->translate('Download');?></a></li>
I tried to use this code to send:
<script type="text/javascript">
function getPasta(){
var id = $(this).attr('id');
$.post(
"../download/index.phtml",
{ pasta: "id" }
);
}
</script>
However it is not working. I also ask how I would capture this value on my landing page, because I need the value pasta:id
is in a PHP variable.