1
I’ve done some research even here on stackoverflow about creating a back button. The situation is that I click on a dynamic record to edit, then I have the option to Cancel (which is to go back) in Ieca and FF works, but in Chrome we have problem.
I’ve tried other alternatives, but nothing worked.
<button type="submit" name="voltar" value="voltar" id="voltar" class="btn btn-default" style="margin-left: 30px">Cancelar</button>
$('#voltar').click(function() {
history.go(-1);
return false;
});
I have tried something direct inline also in JS, but did not give! Some solution ?
SOLUTION: Apparently what I did to make it work was just take the jquery that was at the bottom of the page and play at the beginning of it. You will understand.
This button is generated dynamically by javascript/jquery?
– KaduAmaral
This works on Chrome, I believe what should be wrong is how you go to the edit screen. If it is via ajax, remember that it is you who should manipulate browser history.
– Fernando Leal
Where is the js posted? In a separate script? On the page itself?
– Guilherme Nagatomo
Kadu is not.. is a normal html.
– phpricardo
Guilherme the js/jquery code is on the same page is all very simple!
– phpricardo
There is no ajax no, I just take record (by id) and take the other page and edit the data.
– phpricardo