473,395 Members | 1,383 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,395 software developers and data experts.

Back button functionality

KK
Hi,

I am using history.go(-1) for implementing the back button
functionality.

Its working fine but with this exception.

1. The page which is having back button has some hyperlinks on it.

2. When anybody click on those links, it will open a new windown.

3. After closing the new window, when I click on back button, it is
again opening the new window. But, I want to the page to be redirected
to the previous page to the back button page.

4. But, Its redirecting to the back page correctly when I just click
the back button without opening any link.

Your suggestions are greatly appreciated.

Regards.

Jul 24 '05 #1
25 7514
On 20 May 2005, KK wrote:
I am using history.go(-1) for implementing the back button
functionality.
Why not implementing also the functionalities "Quit Browser"
and "Switch off Computer"?
Your suggestions are greatly appreciated.


Forget about it!

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 24 '05 #2
Dan

KK wrote:
I am using history.go(-1) for implementing the back button
functionality.
Why? My browser has a perfectly functional back button; I don't need
site authors reinventing that wheel for me.
2. When anybody click on those links, it will open a new windown.


That's annoying, for a number of reasons including that it breaks the
functionality of the perfectly good "back" button in my browser
(whether or not you reimplement it in JavaScript).

--
Dan

Jul 24 '05 #3
In our last episode,
<11*********************@g49g2000cwa.googlegroups. com>,
the lovely and talented KK
broadcast on comp.infosystems.www.authoring.html:
Hi, I am using history.go(-1) for implementing the back button
functionality.


What browser doesn't already have a back button that works?
--
Lars Eighner ei*****@io.com http://www.larseighner.com/
College: The fountains of knowledge, where everyone goes to drink.
Jul 24 '05 #4
KK
Guys.. u r mistaken. when I say back button means its a 'button' on the
page. not the browser back button.

Think with common sense.

Jul 24 '05 #5
KK wrote:
Guys.. u r mistaken. when I say back button means its a 'button' on
the page. not the browser back button.
We all knew what you meant. A button within the content somewhere
that says "Back", right? This breaks normal functionality.
Think with common sense.


All of your responses were doing just that.

--
-bts
-This space intentionally left blank.
Jul 24 '05 #6
KK wrote:
Guys.. u r mistaken. when I say back button means its a 'button' on the
page. not the browser back button.
They're not mistaken. They're asking you WHY you are putting a button on
the page to do what they can already do using their browser's Back button.
Think with common sense.


That's what they're advising you to do.

Jul 24 '05 #7
On Fri, 20 May 2005, KK wrote:
Guys.. u r mistaken.
You haven't been around here long, have you? This issue is only about
as old as the WWW itself.
when I say back button means its a 'button' on the
page. not the browser back button.
So you're trying to confuse your users by offering them something in
your page, that's supposed to work only with your page (although it'll
be unreliable), but that replaces something that already works
reliably on all web pages[1], i.e the browser's own Back function.

Does that make sense to you? I reckon it doesn't to us.
Think with common sense.


Indeed. You might try it some time. Did you actually *read* the
replies that you already got?

[1] as long as they don't play damn-fool tricks with meta refresh or
javascript. But the better clients allow that to be disabled, ho hum.
Jul 24 '05 #8
KK
Harlan,

I understand that. But in my application I am using a console which has
different windowns. These "Back button" is in one of the windows.

Its client requirement to keep the back button for user friendlyness.

Thanks.

Jul 24 '05 #9
AES
In article <cP****************@twister.nyroc.rr.com>,
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote:
KK wrote:
Guys.. u r mistaken. when I say back button means its a 'button' on
the page. not the browser back button.


We all knew what you meant. A button within the content somewhere
that says "Back", right? This breaks normal functionality.
Think with common sense.


How about maybe he wants to have a bunch of pages that all have an
identical set of closely located navigation or control buttons, that are
always the same set and perform the same functions, at the same location
on screen (i.e., within his pages; maybe down in the bottom right
corner), on every page, so that users of his site can get used to these
buttons and rapidly flick the pointer back and forth among them --
including the "Back" function (and maybe even the "Quit" function, etc.)
-- without having to do special coding for that button.

What's criminal (or nonsensical) about that? Or is it better to have to
scroll the mouse way up in the upper left corner where the browser
"Back" button lives on many browsers (maximally distant from scroll bars
also, by the way)? Or even have to pull that corner of the window back
into view, as can happen with OS X?

And of course on some OS X browsers anyway the Back button and the
little red Close button are very close to each other, and if you get in
a hurry, or careless, or just have a small brain glitch, you can click
the latter, and end up entirely out of the site.

Why are some of the posters on this group so grumpy?
Jul 24 '05 #10
On Fri, 20 May 2005, AES wrote:
How about maybe he wants to have a bunch of pages that all have an
identical set of closely located navigation or control buttons,
How about he starts to consider what the user wants or needs, rather
than imposing his own suboptimal solutions that only work (unreliably)
on his own pages?
that are always the same set and perform the same functions,
The WWW has a solution to that. It's called the browser controls.
What's criminal (or nonsensical) about that?
You can't tell?
Or is it better to have to scroll the mouse way up in the upper left
corner where the browser "Back" button lives on many browsers
Users who understand their browser better than you will use their
keyboard shortcuts. If you really wanted to help those who didn't,
you'd empower them by helping them to find those, rather than
disempowering them by confusing them with unreliable ersatz.
Why are some of the posters on this group so grumpy?


You provide some very good reasons, you know.
Jul 24 '05 #11
Gazing into my crystal ball I observed "KK" <kr*********@gmail.com>
writing in news:11**********************@o13g2000cwo.googlegr oups.com:
Harlan,

I understand that. But in my application I am using a console which has
different windowns. These "Back button" is in one of the windows.

Its client requirement to keep the back button for user friendlyness.

Thanks.


Then tell the client to stop wanting that. Print out all the responses
to your post and show that to your client. Clients have to be taught
that the WWW is not a program, and it's not a word document, and it's not
an excel sheet, and it's not a newspaper or magazine.

Give a man a fish; you have fed him for today. Teach a man to fish; and
you have fed him for a lifetime.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 24 '05 #12
Adrienne wrote:
Give a man a fish; you have fed him for today. Teach a man to fish; and
you have fed him for a lifetime.


And you get to sell him lots of fishing gear over all that time.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
Jul 24 '05 #13
In article <11*********************@g49g2000cwa.googlegroups. com>,
kr*********@gmail.com enlightened us with...

I am using history.go(-1) for implementing the back button
functionality.

Its working fine but with this exception.

1. The page which is having back button has some hyperlinks on it.

2. When anybody click on those links, it will open a new windown.

3. After closing the new window, when I click on back button, it is
again opening the new window. But, I want to the page to be redirected
to the previous page to the back button page.

4. But, Its redirecting to the back page correctly when I just click
the back button without opening any link.

Your suggestions are greatly appreciated.


You'd need to save the state (i.e. the previous page) in a globally
accessible place (session, cookie, or whatnot). Don't change the state when
the new window is opened. Instead of using history.go, you'd use
location.href and set it.

I do something similar for a framed site of mine to get around the whole
refreshing the frameset refreshes to the index page issue. I save each page
in a session variable, then when the frameset is loaded, check for that
variable and load that page, if the variable is defined.
My solution uses server-side code for part of it (session data), but in
theory, it could be done totally client-side for your needs using cookies.
I'd need to know a little more about your application architecture to give
you a more detailed solution, though.
You might even be able to do this just by passing the previous URL as a URL
param itself. Depends on what you need and what you already have.

--
--
~kaeli~
Not one shred of evidence supports the notion that life is
serious.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 24 '05 #14
KK
Hi Kaeli,

Thanks for your suggestion. I am expecting this kind of workable
solution.

Regards.

Jul 24 '05 #15
On 20 May 2005 06:27:01 -0700, "KK" <kr*********@gmail.com> wrote:
I am using history.go(-1) for implementing the back button
functionality.


Why? Are you growing your own wheat and grinding it to implement the
flour functionality?

Every browser has a back button or the equivalent. Reinventing that
is at best a waste of your time and at worst an annoyance to your
visitors since your implementation doesn't actually work for
everyone.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 24 '05 #16
On 20 May 2005 11:11:49 -0700, "KK" <kr*********@gmail.com> wrote:
Guys.. u r mistaken. when I say back button means its a 'button' on the
page. not the browser back button.

Think with common sense.


Honey, take your own advice. Since there is already a back button in
every browser, there is no need for one on your page -- particularly
one like yours that doesn't actually work.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 24 '05 #17
On 20 May 2005 13:01:47 -0700, "KK" <kr*********@gmail.com> wrote:
Harlan,

I understand that. But in my application I am using a console which has
different windowns. These "Back button" is in one of the windows.

Its client requirement to keep the back button for user friendlyness.

Thanks.


Let me guess: posting from Google Groups, right?
[pause to examine headers]
Yup.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 24 '05 #18
On 20 May 2005 13:01:47 -0700, "KK" <kr*********@gmail.com> wrote:
Its client requirement to keep the back button for user friendlyness.


If this is actually true, you need to educate your client.

User friendliness consists in letting things do things their way,
not your way. Their way, in this case, is using the browser controls
they already know.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 24 '05 #19
AES
Opinions expressed on this group, on this thread (several are collected
at the end of this msg [1]) and sometimes others, are sometimes as
bizarre as they are entertaining. To contribute to the trend:

* If you install a garage door opener in your garage, the installation
will include a hardwired Back button -- pardon me, a hardwired
Open/Close button -- that's directly connected to it in the garage, and
that is part of it. Every garage door opener has such a button.

* What? Now you also want a remote control button for this same
function, that you'll maybe carry around in your car, or that you might
(God forbid) even build into your car?

* Or another button somewhere else on your property, so you can open
the door, maybe for a delivery, from some other location?

* Or (God really forbid!) a multi-function remote control gadget with
multiple buttons that can also turn on the garage lights or the backyard
lights, or turn off the stereo, or . . .?

* Why would you want that? Why can't you just walk in the garage and
push the hardwired button that was provided for that purpose? The
hardwired button is the one that's part of the garage door opener, that
came with it, that the opener itself knows about. Walk over and use it,
instead of asking for unnecessary other ways to open the door. What if
you regular car with the built-in remote button was in the shop and you
came home in a loaner?

In short, if there's a genuine technical reason inherent in the formal
definition of HTML that means a Back button really can't be built into a
web page without causing real and unsolvable technical problems for
other people who are also using HTML properly and within its specs,
well, that's unfortunate, and clearly a reason not to do it.

But there are at least some perfectly sensible reasons why some people
might _want_ to have the capability that's been so severely dumped on in
this thread (several such reasons are appended below in [2]); and
wanting it, and inquiring about it, are not immoral, much less criminal,
acts.

=============================================

[1] REASONS GIVEN FOR DISCOURAGING BACK BUTTON ON A WEB PAGE:

Why not implementing also the functionalities "Quit Browser" and "Switch
off Computer"?

(Why not, indeed, if they or some other similar functionalities are (a)
technically feasible within the HTML spec, and (b) someone would find
them useful?)

Why [do you want this]? My browser has a perfectly functional back
button; I don't need site authors reinventing that wheel for me.

(And your garage door opener has a perfectly function hardwired button;
you don't need someone inventing additional remote control buttons for
you.)

What browser doesn't already have a back button that works?

{What garage door opener doesn't already have a hardwired button that
works.)

We all knew what you meant. A button within the content somewhere that
says "Back", right? This breaks normal functionality.

(Huh?)

Then tell the client to stop wanting that. Print out all the responses
to your post and show that to your client. Clients have to be taught
that the WWW is not a program, and it's not a word document, and it's
not an excel sheet, and it's not a newspaper or magazine.

(Stop wanting that remote garage door control button!)

Why? Are you growing your own wheat and grinding it to implement the
flour functionality?

(Why? Are you drawing your own wire?)

Every browser has a back button or the equivalent. Reinventing that is
at best a waste of your time and at worst an annoyance to your visitors
since your implementation doesn't actually work for everyone.

(And every garage door opener has a . . . Oh, hell, forget it.)

Honey, take your own advice. Since there is already a back button in
every browser, there is no need for one on your page -- particularly one
like yours that doesn't actually work.

(Ditto preceding response. Since there is already a hardwired button on
every garage door opener . . .)

User friendliness consists in letting things do things their way, not
your way. Their way, in this case, is using the browser controls they
already know.

(And the garage door opener wants you to use _it's_ hardwired button,
'cause that's what _it_ already knows?)

=============================================

[2] PERFECTLY REASONABLE REASONS FOR MAYBE WANTING A BACK BUTTON ON A
PAGE

1) Some people might want to hide their browser window's tool bar while
viewing (or projecting) a set of web pages, to gain extra screen space
or reduce clutter; this functionality is actually built into some
browsers, not so? If you've done this, getting back to the browser's
web button requires an extra step.

2) How about maybe the web site author wants to have a bunch of pages
that all have an identical set of closely located navigation or control
buttons, that are always the same set and perform the same functions, at
the same location on screen (i.e., within his pages; maybe down in the
bottom right corner), on every page, so that users of his site can get
used to these buttons and rapidly flick the pointer back and forth among
them -- including the "Back" function (and maybe even the "Quit"
function, etc.) -- without having to do special coding for that button.

What's criminal (or nonsensical) about that? Or is it better to have to
scroll the mouse way up in the upper left corner where the browser
"Back" button lives on many browsers (maximally distant from scroll bars
also, by the way)?

3) With at least some browsers and OSs, it's possible to shift part of
the browser window off screen, such that you have to pull the upper left
corner of the window back into view before you can get to the Back
button.

4) And finally, on some OS X browsers anyway the Back button and the
little red Close button are very close to each other, and if you get in
a hurry, or careless, or just have a small brain glitch, you can
accidentally click the latter, and end up entirely out of the web site
you were in.
Jul 24 '05 #20
On Wed, 25 May 2005, AES wrote:
* If you install a garage door opener in your garage, the installation
will include a hardwired Back button -- pardon me, a hardwired
Open/Close button -- that's directly connected to it in the garage, and
that is part of it. Every garage door opener has such a button.

* What? Now you also want a remote control button for this same
function, that you'll maybe carry around in your car, or that you might
(God forbid) even build into your car?
Your logic is impeccable. The alternative operation buttons are
provided at the customer's request and according to their perceived
requirements, they aren't forced on them by the supplier of the
equipment according to what they want to customer to have.

"Hence or otherwise deduce" their relevance to an author putting them
into a web page. That's aside from the fact that they don't work
reliably, unlike the ones (shorcuts, bookmarklets etc.) which the user
could implement for themselves in their browser, if they don't want to
use the standard button or its shortcut (Alt/Left Arrow in the one
that I'm using) which the browser offers them as standard.
In short, if there's a genuine technical reason inherent in the formal
definition of HTML that means a Back button really can't be built into a
web page without causing real and unsolvable technical problems for
other people who are also using HTML properly and within its specs,


"Abigail" documented the problem many years ago. The situation has
changed only in detail, not in principle.
Jul 24 '05 #21
AES wrote:
Opinions expressed on this group, on this thread (several are collected
at the end of this msg [1]) and sometimes others, are sometimes as
bizarre as they are entertaining. To contribute to the trend:

* If you install a garage door opener in your garage, the installation
will include a hardwired Back button -- pardon me, a hardwired
Open/Close button -- that's directly connected to it in the garage, and
that is part of it. Every garage door opener has such a button.

[snipping further discussion of the putative convenience of having
alternative garage door buttons throughout one's house]

Your analogy doesn't fit. Yes, there are at least two different places
(the entrance from the garage to the house and the interior of the car),
not within reach of each other, where a person might be when he needs to
open or close his garage door. In contrast, at all times that a user
will be on the web site in question, he will be viewing it through his
browser, with the browser's Back button exactly where it always is, no
matter what web site the user is looking at, within easy reach. Or do
you imagine that the browser's regular Back button becomes less
accessible somehow when the user is visiting this particular site?
Jul 24 '05 #22
I'd like to take a positive approach here and mention Buttons
That Are Needed.

My number one recommendation for buttons that are needed (and
often are not provided or are not provided in an obvious place)
is:

1) Button to escape from form-submitted-thank-you page. We
don't need a back button here - especially not one that exactly
duplicates the browser's back button - because we don't want to
go where back would take us. Please give us a button that will
deliver us someplace safe so we don't have to back over the
form. Please don't call it a back button.

--
Lars Eighner ei*****@io.com http://www.larseighner.com/
Someday you will look back on this moment and plow into a parked car.
Jul 24 '05 #23
Lars Eighner wrote:
I'd like to take a positive approach here and mention Buttons
That Are Needed.

My number one recommendation for buttons that are needed (and
often are not provided or are not provided in an obvious place)
is:

1) Button to escape from form-submitted-thank-you page. We
don't need a back button here - especially not one that exactly
duplicates the browser's back button - because we don't want to
go where back would take us. Please give us a button that will
deliver us someplace safe so we don't have to back over the
form. Please don't call it a back button.


I second that: a page shouldn't leave you hanging as to what to do next.
"Return to home page" or "Return to document index" or "Main Menu" are
useful next-step links, but they shouldn't be implemented as Back
buttons. They should move *forward* to the page in question.
Jul 24 '05 #24
On Wed, 25 May 2005, Harlan Messinger wrote:
I second that: a page shouldn't leave you hanging as to what to do next.
Agreed.
"Return to home page" or "Return to document index" or "Main Menu"
are useful next-step links, but they shouldn't be implemented as
Back buttons. They should move *forward* to the page in question.


Indeed, and the user might never have visited that page before. So
what's that pointless word "Return" doing there, please? It adds
nothing, but irritates those who know they haven't been there before.
It's often seen, and often thougtlessly copied by others, but I'd
say simply take it out.
Jul 24 '05 #25
On Wed, 25 May 2005 14:52:51 -0500, Lars Eighner <ei*****@io.com> wrote:
1) Button to escape from form-submitted-thank-you page.


Sounds like you'd also need a <link rel="foo" ... > on the page to
indicate just where it needed to go.

Jul 24 '05 #26

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

Similar topics

4
by: Belinda | last post by:
Hello All I need to read a SQL Server table into a Web Page and within the Web Page to permit my users to make changes to the records, delete or add new records and then save the entire contents...
1
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
8
by: Galahad | last post by:
Here's the question: I have a form w/ TextBox controls and a Search Button control. Once the user clicks the Search Button, they get a Modal dialog w/ a datagrid that contains their search...
5
by: Mały Piotruœ | last post by:
Hello, (Sorry for my english.) I am new to HTML/JavaScript/CSS. I would like to ask for help with such a problem: I need to create a href link working like "back" button (I know this is not...
3
by: shimonsim | last post by:
Hi In my application I have a wizard and I have to make sure that user can't come back to previous page of the wizard. The problem is that is user clicks on "Back" button of the brouser he returns...
2
by: Leszek Taratuta | last post by:
Hello, I am using the following code to prevent users to see the previous pages: Response.CacheControl = "no-cache"; Response.AddHeader( "Pragma", "no-cache" ); Response.Expires = -1; When...
10
by: DotNetGruven | last post by:
How are people handling the browser back button on database driven web apps built using ASP.NET?? We keep state in Session and the back button is causing us lots of head aches! Is this just a...
8
by: Shimon Sim | last post by:
Hi, Every time I write ASP.NET application I have the same problem - Back button on the browser is my enemy. I have to tell client avoid using "Back" button and if you use it make sure to refresh...
5
by: Tom wilson | last post by:
I'm developing an application that is a benefits enrolment website. The benefits can be of any type in any order as stored in a SQL server. On each page is a Back and Next button. At a certain...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
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.