I'm learning, I know some php and little jquery. I have to make some adjustments to an application of my work, developed in cake php. At this moment, clicking on a link takes me to a previous screen. I need to give that same behavior to a button that I have below. The original line is:
<a href="<?php echo $this->Html->url(array('controller' => 'pages', 'action' => 'display', 'preguntas')); ?>" class="reload_link productos">
<< Volver a Categorias
</a>
When you click on < < Back to Categories returns a screen. I have done the following:
$("#btn-volver").click(function(e){
e.preventdefault();
'<a href="<?php echo $this->Html->url(array('controller' => 'pages', 'action' => 'display', 'preguntas')); ?>" class="reload_link productos">';
});
The idea is that you do not perform the default behavior, that you make the call to the page of the first code. Any help on how to do it with jquery to see if I can understand? I failed to add that what I did did not work for me .. Thanks !!