By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,592 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,592 IT Pros & Developers. It's quick & easy.

onClick="history.back()

P: n/a
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

Jun 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jun 11, 7:31 am, elia <jos...@pcl.chwrote:
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 ...

--
David Dorward
http://dorward.me.uk/

Jun 11 '07 #2

P: n/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 :

<a href="#" onclick="history.go(-1)">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".
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
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jun 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.