onClick="history.back()

E

elia

Hello,

We change our server and before this code was ok:

<a href="#" onClick="history.back()">Retour</a>

...but on the new server, it doesn't work anymore?? We come back, see
the last page and return again to the page witn the code
"history.back".

I have to change this code or something on the server??

Thanks, pascal
 
D

David Dorward

Hello,

We change our server and before this code was ok:

<a href="#" onClick="history.back()">Retour</a>
..but on the new server, it doesn't work anymore??

There's no reason why a change in server should break code, but that
should be avoided for a number of reasons:

* It is a link to the top of the page. href="#" is not a sensible fall
back should JS fail
* It depends on JavaScript
* The user already has a back button, it is generally a bad idea to
waste space with a UI that duplicates a function built into the
browser but with a UI the user doesn't recognise.
* Links go forward. You have something that looks like a link, but
doesn't act like it.

Just remove it and let the user use their back button, or backspace
key, or Alt+Left Arrow, or Right Click and pick Back, or ...
 
A

ASM

elia a écrit :
Hello,

We change our server and before this code was ok:

<a href="#" onClick="history.back()">Retour</a>

Ça c'est du code écrit dans un fichier html, avec une action JavaScript
au clic sur le lien qui demande *coté client* que le brouteur remonte
dans son historique. Ça ne devrait pas à voir avec le serveur ?!

Une variante :

..but on the new server, it doesn't work anymore?? We come back, see
the last page and return again to the page witn the code
"history.back".

Curious ... ? !
May we see ?
Are these pages displayed in a popup ?
Does that arrise with any browser ?
I have to change this code or something on the server??

Il n'y a certainement pas ce code sur le serveur !
Thanks, pascal

Ask to a group speaking of server
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top