473,472 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

window.history.back()

I used <input type="button" value="Back to Correct"
onclick="window.history.back();"> to go back to the previous page is
working, but if i use the as below instead, it does not work. what did I do
wrong?

<a href="javascript:document.testform.newid.value='Ne w';" class="btn1-text"
onclick="window.history.back();">Back to Correct<a>
Jul 23 '05 #1
1 5319
Lee
HandersonVA said:

I used <input type="button" value="Back to Correct"
onclick="window.history.back();"> to go back to the previous page is
working, but if i use the as below instead, it does not work. what did I do
wrong?

<a href="javascript:document.testform.newid.value='Ne w';" class="btn1-text"
onclick="window.history.back();">Back to Correct<a>


The "javascript" pseudo-protocol evaluates the javascript expression
and, if it is not empty, uses the result as the new contents of the
page. Your expression evaluates to the string "New", so that becomes
the new contents of the page.

If you don't want to follow that link, you need to have the onclick
handler return false.

onclick="window.history.back();return false"

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marco Dieckhoff | last post by:
Hi! I'm trying to use a combination of windows.print() followed directly by history.back(). The desired effect is to print the shown window and go back to that one before. I'm presenting a...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
2
by: Joe D Williams | last post by:
Thanks for the link to: http://www.w3.org/TR/Window Reading further, it seems like some input is needed: 1.2. Not in This Specification * ISSUE-59: Should Window 1.0 include history?...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
10
by: Tony | last post by:
I need to know how to open a pop up and close the main window without a prompt in Firefox 2 and IE 7. Anybody have any ideas on how to do that. I currently have this and it works in IE 6 and...
5
hsriat
by: hsriat | last post by:
I add a link on the onload event of the body. The link is displayed as BACK if the page is opened from another page, but if the page is opened in a new window, its displayed as CLOSE Here's the...
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
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.