Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Need a little piece of website code

06 May 2010   #1

Windows 10 Tech Preview 9926 x64
Need a little piece of website code

Hey guys,
So, I'm working on the new website for the organization that I work for, and it's coming along really well. The problem that I am having is that, while I know html inside and out, I pretty much know nothing about Java. What I need is a bit of code where I can have a link that will take the person back to the last page they were on. Can anyone help me out?

My System SpecsSystem Spec
06 May 2010   #2


It's pretty simple. JavaScript has the history object. Just off the top of my head, iirc, it's just something like

<a href="javascript:history.go(-1)">Previous Page</a>

<a href="javascript:history.back()">Previous Page</a>
The number in the parenthesis is the amount of pages to go back in the history, so changing it to -2 would put the user 2 pages back, and so on. Changing it to a positive number, so just 1, 2 etc, lets the user go forward in history.
My System SpecsSystem Spec
06 May 2010   #3

Windows 10 Tech Preview 9926 x64

Awesome, it works great. Thanks Everlong!
My System SpecsSystem Spec

06 May 2010   #4


You're welcome :)
My System SpecsSystem Spec

Thread Tools

Similar help and support threads
Thread Forum
email website links and taskbar pin website defaulting to Chrome
Links to websites, either from emails or from shortcuts pinned to my PC desktop's task-bar have suddenly been directed to Google Chromes search page. There are four icons pinned to the task-bar that work;Windows Media Player, Internet Explorer, Google Chrome, Google Earth and Windows Live Mail all...
Browsers & Mail
piece by piece upgrade of an old computer?
hi i lately got a 500W psu from my father who got it from his job becouse they didnt need it, now that my power problems in my computer is out of the way, i figured that i accually can get a good gpu! i can soon afford an GTX 660 or a GTX 650Ti but my cpu is an old amd phenom x3 2.4Ghz and my...
PC Custom Builds and Overclocking
A piece of history
One of my Heroes. He went places and did things that nobody else would or could that why all kills were not confirmed by others. The NVA put what they considered a Kings ransom for anybody that could kill him. A short film. lnKvyrMf9EE
Chillout Room
Have to LOVE the author of THIS piece of code (Uif to ISO !!)
Hi there I'm trying to convert a UIF file (why people use this anymore is beyond me -- closed usage of supposedly OPEN formats is not a good idea -- even APPLE don't do that) to a standard ISO so it can be burned / mounted / read via standard software. I LOV E the comment the author of this...
Chillout Room
So you want your next piece of kit FOR FREE
Hi all I've been stuck at home for nearly a week waiting for non existent planes to fly back to work:cry: -- but I haven't been wasting my time. In fact the idea is SO SIMPLE that I can't believe it's not more well known -- even when I explain the system in the pub people look with astonishment...
Chillout Room

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:41.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App