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

javascript:history.back() for frame

Ike
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 exists in a frame, it only pertains to this frame?
Thanks, Ike
Jul 23 '05 #1
4 13561

Ike wrote:
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 exists in a frame, it only pertains to this frame? Thanks, Ike


using frames breaks the back function (in the sense the user expects it
to work, not in the sense of a browser crash). bear in mind that the
back button is by FAR FAR FAR the most used navigation feature - so
avoid frames.

if you insist on frames:

write your own back function - means read history content, determine
the state of each frame from that value, change the frames (using js).
but don't expect visitors to use it - they'll use the back button of
the browser - and you can't fix the frame problem there.
micha

Jul 23 '05 #2
micha wrote:
Ike wrote:
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 exists in a frame, it only pertains to this


frame?
Thanks, Ike

using frames breaks the back function (in the sense the user expects it
to work, not in the sense of a browser crash). bear in mind that the
back button is by FAR FAR FAR the most used navigation feature - so
avoid frames.

if you insist on frames:

write your own back function - means read history content,


And just how do you propose to "read history content"? Anything you do
that depends on the ability to read the history contents is doomed to
failure before you even start.
--
Randy
Jul 23 '05 #3

Randy Webb wrote:
micha wrote:
Ike wrote:
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 exists in a frame, it only pertains to this
frame?
Thanks, Ike

using frames breaks the back function (in the sense the user expects it to work, not in the sense of a browser crash). bear in mind that the back button is by FAR FAR FAR the most used navigation feature - so
avoid frames.

if you insist on frames:

write your own back function - means read history content,


And just how do you propose to "read history content"? Anything you

do that depends on the ability to read the history contents is doomed to failure before you even start.
--
Randy


you're right of course. i haven't done much in javascript for a while,
so i forgot. you can't read the history. in that case you'd have to
mock up something like you own history for a solution of the frame
problem - which definitivly won't be reliable and a lot of hassle. so
it all boils down to what i tried to make clear in my 1st post - don't
use frames.
i found that about any functionality frames provide can be replaced
very well by some kind of template system, i.e. for navigation and
logo.

micha

Jul 23 '05 #4
micha wrote:
Ike wrote:
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 exists in a frame, it only pertains to this
frame? Thanks, Ike


using frames breaks the back function (in the sense the user expects it
to work, not in the sense of a browser crash).


It does not, as the history of the frameset window consists of the combined
histories of every frame. However, users that are not aware that they are
using a frameset may be confused by the normal behavior.
PointedEars
Jul 23 '05 #5

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

Similar topics

15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
1
by: Ian | last post by:
I'd appreciate some help on this one. We use a three-window frameset for online manuals. The "main" window contains our document. Since the documents have hyperlinks between them for related...
2
by: Vinnie | last post by:
Is it possible to redirect a user dependent on the domain of the last web page viewed? For example, if the user came from "thisdomain.com", I want to redirect them back to this page. But, if the...
3
by: Jake | last post by:
Im using some custom javascript:history.forward() & javascript:history.back() image buttons on my application. If there is no back or forward history, I would like to display a dimmed(disabled...
2
by: Luke - eat.lemons | last post by:
Hi, I have this function: <script type="text/javascript"> function disp_prompt() { var reqid=prompt("Please enter the membership ID number","") if (reqid!=null && reqid!="") { reqid=reqid }
4
by: Heinrich Wolf | last post by:
Hi all I have a history.back() problem with FF(2). IE works as expected, while FF does not. The multi frame website setup as a whole with a lot of frame content switching works flawlessly in...
8
by: nitinpatel1117 | last post by:
Hi, What i'm trying to do, may not be possible. but i just wanted to know if there is a way of doing this. Basically what i am trying to achieve is to call the previous php script that was run...
3
Bob Ross
by: Bob Ross | last post by:
I am trying to create a kind of back button for one my pop up pages. I am just using history.go(-1) for the button. I would like to only make the button visible when the user can go back. the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.