I have a link at http://myweb.localhost/miembros/id/1/mensajes. When I click that link, the code below is called:
<script type="text/javascript">
$('.switch_leido').click(function(){
$.post('mensaje/cambiarEstadoLeido',
{id:$(this).data('leido')},
function(){
alert("fasfsf");
}
);
});
and I get this error:
POST http://myweb.localhost/miembros/id/1/mensaje/cambiarEstadoLeido 404 (Not
Found)
Instead, I expected http://myweb.localhost/mensaje/cambiarEstadoLeido was called but no..:S
What should I do?
Javier
Your path is set relative. Use a “/” in front to reference the root of the web site