473,394 Members | 2,031 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,394 software developers and data experts.

Website: Step back on page

nomad
664 Expert 512MB
I'm looking for a java script that when you click on a button it will step you back on web page.
ie if you're on storefront_1.htm and you goto storefront_2 and there is a button called "Close" and when you click on it it will take you back to the previous webpage.

nomad
not http://storefront_1.htm
Jul 13 '07 #1
7 1783
acoder
16,027 Expert Mod 8TB
The browser already has a back button. There's no need for a back button link. Do you want to know some disadvantages? Read this.

Why not just link to the first page instead like this:
[HTML]<input type="button" value="Close" onclick="location.href='store_front1.htm'">[/HTML] or you could use a link.
Jul 14 '07 #2
nomad
664 Expert 512MB
The browser already has a back button. There's no need for a back button link. Do you want to know some disadvantages? Read this.

Why not just link to the first page instead like this:
[HTML]<input type="button" value="Close" onclick="location.href='store_front1.htm'">[/HTML] or you could use a link.
I know how to do that one, what I'm looking for is it should take you back to the previous page no matter what what the second page is.
ie it has to do with -1

nomad
Jul 14 '07 #3
gits
5,390 Expert Mod 4TB
I know how to do that one, what I'm looking for is it should take you back to the previous page no matter what what the second page is.
ie it has to do with -1

nomad
the qouted link from acoder showed the window.history-object already ... that you may use but should not use ;) ... i agree with that opinions ... you normally shouldn't have to use the history-back-method ... since the browser has a control for it already ... but sometimes i think you need such an option for whatever reason that might be ... so i think the history-object is what you are looking for? here is a short overview:

window.history-object

kind regards
Jul 16 '07 #4
nomad
664 Expert 512MB
the qouted link from acoder showed the window.history-object already ... that you may use but should not use ;) ... i agree with that opinions ... you normally shouldn't have to use the history-back-method ... since the browser has a control for it already ... but sometimes i think you need such an option for whatever reason that might be ... so i think the history-object is what you are looking for? here is a short overview:

window.history-object

kind regards
Thanks for the info that is what I was looking for.

Need this because I have an a small web page that has info only but no menu on it.
Jul 16 '07 #5
acoder
16,027 Expert Mod 8TB
Thanks for the info that is what I was looking for.

Need this because I have an a small web page that has info only but no menu on it.
Is it a popup window with no toolbar?
Jul 17 '07 #6
nomad
664 Expert 512MB
Is it a popup window with no toolbar?
its not ready a pop-up window considering most people avoid them, its just a small window that opens and gives addition info. want the user to click on it to close it.

nomad
PS Found out how to do it
Jul 17 '07 #7
acoder
16,027 Expert Mod 8TB
PS Found out how to do it
Yes, history.back() or history.go(-1) will send you back one page.

I can see one place where it can make sense to use it. That would be when you have a restricted access page which you can only get to if you click on submit or something from the first page. If you try to access it directly, it redirects you back to the first page. Since you know for certain what Back would take you to, none of the disadvantages apply.
Jul 18 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike | last post by:
I'm not sure what to call what I want, but I will describe my intent, hoping that someone will offer a resource for a ready-built solution. I sell construction products to a group of about 50...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
2
by: Anna | last post by:
I added a small Web.Config file to the root of my website so that I could view errors on a machine other than the server: <configuration> <system.web> <customErrors mode="Off" /> </system.web>...
2
by: Steve Richter | last post by:
I want my web page to display its contents in a step by step process. step1: enter a zip code, click the "next step" button in the NextStep button click event: - retrieve info that pertains...
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
13
by: Kobee | last post by:
Hi, I'm having a few issues adapting to new 2.0 "website" project vs. the old 1.1 "web application". One of the major issues I'm having is with the notion of namespaces. Using the old way, I...
1
by: ganich | last post by:
Hello, i am looking for a Php script which could help me in organising my website. Ok the problem ... i have created index.html and made full layout in it. I use iframe in a table to view the...
1
by: ganich | last post by:
Hello, i am looking for a javascript which could help me in organising my website. Ok the problem ... i have created index.html and made full layout in it. I use iframe in a table to view the...
1
by: runway27 | last post by:
i want to implement a feature where a user searches with a keyword and search results are displayed according to the keyword or phrase entered by the user. following are the steps i want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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...

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.