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

Back button interferes with navigation - how can this be avoided?

My webpage with a free textbook has a simple html navigation.
Moving the cursor on the menu item makes
appear the menu item red, using onmouseover.

If I click that menu item, I get to the new page.
Everything works fine. But if I then bo back
with the back button (Mac Safari and IE - have not
checke on PC yet) I do get back to the previous
page, but with the choice of the next already/still highlighted.
(There are two red bars in this case.) Ugly.

All the programming is in html pages and in one css file;
nothing is hidden. (See http://www.motionmountain.net )
What is going wrong? How can one avoid this?

Any hint is appreciated.

Regards

Christoph Schiller

Jul 21 '05 #1
9 4033
On 9 Apr 2005 14:36:28 -0700, <ch***********@yahoo.com> wrote:
My webpage with a free textbook has a simple html navigation.
Moving the cursor on the menu item makes
appear the menu item red, using onmouseover.

If I click that menu item, I get to the new page.
Everything works fine. But if I then bo back
with the back button (Mac Safari and IE - have not
checke on PC yet) I do get back to the previous
page, but with the choice of the next already/still highlighted.
(There are two red bars in this case.) Ugly.

All the programming is in html pages and in one css file;
nothing is hidden. (See http://www.motionmountain.net )
What is going wrong? How can one avoid this?


I didn't go look, but it doesn't sound like anything going wrong to me.
The element a probably still has focus. If you style a:focus (or maybe
a:active if it turns out to be active still) with the background color of
choice, your so called problem might just disappear.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #2

What is focus? I have never used the term in my stylesheet.

Jul 21 '05 #3
On 9 Apr 2005 15:11:22 -0700, <ch***********@yahoo.com> wrote:

[Please learn to quote properly. Quote the bit you reply to, attribute it
and then reply underneath the quote.
What is focus? I have never used the term in my stylesheet.


<http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes>

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #4

<ch***********@yahoo.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
My webpage with a free textbook has a simple html navigation.
Moving the cursor on the menu item makes
appear the menu item red, using onmouseover.

If I click that menu item, I get to the new page.
Everything works fine. But if I then bo back
with the back button (Mac Safari and IE - have not
checke on PC yet) I do get back to the previous
page, but with the choice of the next already/still highlighted.
(There are two red bars in this case.) Ugly.
This is due to the browser settings on the client, which you cannot
override. By using the back button to return to a page that page will be
shown as it was (i.e. with the forward navigation links still marked as
unselected) unless the browser is specifically told to reload the page. It
is only by reloading the page will the status of any links be evaluated.

--
Tony Marston

http://www.tonymarston.net
All the programming is in html pages and in one css file;
nothing is hidden. (See http://www.motionmountain.net )
What is going wrong? How can one avoid this?

Any hint is appreciated.

Regards

Christoph Schiller

Jul 21 '05 #5
ch***********@yahoo.com wrote:
My webpage with a free textbook has a simple html navigation.
Moving the cursor on the menu item makes
appear the menu item red, using onmouseover.

If I click that menu item, I get to the new page.
Everything works fine. But if I then bo back
with the back button (Mac Safari and IE - have not
checke on PC yet) I do get back to the previous
page, but with the choice of the next already/still highlighted.
(There are two red bars in this case.) Ugly.


Ugly? It reminds the user that he's already visited the page to which
the link leads. That's useful, and it's been normal browser presentation
since the beginning of graphical browsers. Why is that a problem?
Jul 21 '05 #6
Harlan Messinger wrote:
Ugly? It reminds the user that he's already visited the page to which
the link leads. That's useful, and it's been normal browser presentation
since the beginning of graphical browsers.


And it has always been a problem for web application developpers since
the very beginning of web developpment.
In web application, it could be very difficult to manage a click on a
back button - because you're lossing the user context when he does that.
Jul 21 '05 #7
Greg Schmidt <gr***@trawna.com> wrote in message news:<1b****************@trawna.com>...
On 10 Apr 2005 00:08:03 -0700, ch***********@yahoo.com wrote:
<tr>
<td class="lmenu" onmouseover="this.className='lmon'"
onmouseout="this.className='lmout'"
onClick="window.self.location='text.html'"><a
href="text.html">Download</a></td>
</tr>
...
Anyway, when clicking on "back" the previous choise is still there,
as if the pointer had remained over it - which it is not; the pointer
is on the back button. Why?


Seems that it's because there was never an "onmouseout" event generated.
Maybe your onClick should call a function which does the onmouseout code
and then loads the new page? (That's a wild guess, I haven't tried it.)
Even better, why not get rid of all the JavaScript junk that won't work
for a large percentage of the population anyway and do this all with the
CSS a: pseudoclasses?


Would you let me know how to do it?

Regards

Christoph Schiller
Jul 21 '05 #8
On 15 Apr 2005 04:49:50 -0700, Christoph Schiller wrote:
Greg Schmidt <gr***@trawna.com> wrote in message news:<1b****************@trawna.com>...
On 10 Apr 2005 00:08:03 -0700, ch***********@yahoo.com wrote:
<tr>
<td class="lmenu" onmouseover="this.className='lmon'"
onmouseout="this.className='lmout'"
onClick="window.self.location='text.html'"><a
href="text.html">Download</a></td>
</tr>
...
Anyway, when clicking on "back" the previous choise is still there,
as if the pointer had remained over it - which it is not; the pointer
is on the back button. Why?


Seems that it's because there was never an "onmouseout" event generated.
Maybe your onClick should call a function which does the onmouseout code
and then loads the new page? (That's a wild guess, I haven't tried it.)
Even better, why not get rid of all the JavaScript junk that won't work
for a large percentage of the population anyway and do this all with the
CSS a: pseudoclasses?


Would you let me know how to do it?


I think you're looking for something like http://trawna.com/cssmenu.html
It should work at least as well, probably better, and it's a fraction of
the code. Enjoy!

--
Greg Schmidt gr***@trawna.com
Trawna Publications http://www.trawna.com/
Jul 21 '05 #9
On Fri, 15 Apr 2005 12:04:43 -0400, Greg Schmidt wrote:
I think you're looking for something like http://trawna.com/cssmenu.html


Damn! That should have been http://trawna.com/test/cssmenu.html
(Repeat to self: copy-and-paste, copy-and-paste)
Tested on Opera 6/7, Netscape 6, Firefox and IE5/6. Less than stellar
on NS4 and IE4, but their combined market share should be less than the
percentage of users without JavaScript (either through personal or
institutional choice), and CSS hiding tricks can be done to improve the
look for them if desired.

--
Greg Schmidt gr***@trawna.com
Trawna Publications http://www.trawna.com/
Jul 21 '05 #10

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

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
5
by: Nick Li | last post by:
Hi, I need to create a html page so that "Back" button(or some other button) is disabled in IE browser. I would appreciate your help. Nick Li
4
by: Ike | last post by:
Can someone show me how I can have: <a href="javascript:history.back()" name="Back" value="Back" style=width:40px;float:right;margin-left:0px class="button" >Back</a> but since this href...
13
by: chri_schiller | last post by:
My webpage with a free textbook has a simple html navigation. Moving the cursor on the menu item makes appear the menu item red, using onmouseover. If I click that menu item, I get to the new...
25
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. ...
5
by: Veeresh | last post by:
I have written an ASP.Net application and has question regarding page navigation. Aftyer logging in to the web site by clicking on the back button user can go back to the login ASPX page. How to...
1
by: Johan Nedin | last post by:
Hello! I am having a problem with the @OutputCache page directive and Web browser Back Buttons. Problem: After setting <%@ OutputCache Location="None" %> on my pages I get the "Warning!...
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...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.