473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

onClick="history.back()

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
2 13018
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
1
by: JJA | last post by:
When my webserver does not process a user's change because of an invalid password, I inform the user and I want to present them a button for a retry: <TR id=continuebuttonrow> <td...
1
by: Tom Youngquist | last post by:
Does anyone know the command to "imitate" the "Back" button on a browser in .NET. I have looked in the Redirect but can't seem to find anything. I can re-direct to a specific page but my users...
24
by: AES/newspost | last post by:
On many web sites or pages (including my own home page) clicking on certain links will start downloading a PDF file, sometimes without the author having provided any warning in the text of the page...
4
by: Roger | last post by:
Hi, I have been using this trick for some time on a home page. The idea is to verify the user's browser has Javascript enabled before allowing the user to access a logon page. The...
0
by: karunakar | last post by:
Hi All Here i want to show in datagrid Broder color as like image showed i attaching images pls check and help me out "Onlclick" i want to show red border color each row in DATAGRID in ASP.NET...
0
by: Quentin Huo | last post by:
Hi: In my page, there is a user control and there are some actions in the user control like "save", "delete",...which are the control <asp:button onclick="btSave_Click" ......>. And there are...
8
by: Coleen | last post by:
Yes, I know why would I want to create a back button when there is one on the browser? Because that's what the users want! they want a "Previous" button that they can click from any web page in...
4
by: dr1ft3r | last post by:
Hey guys, I'm building a site for a landscaping business down the street and can't seem to get part of the code functioning correctly. The code fails on line 68 where I make a reference to an...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.