back/previous button...

D

Domestos

Is this the best way to implement a 'previous' button? How do i deal with
non-javascript enabled browsers? Note : I do not want to implement a link
back to the previous page - i need it to be dynamic...

<a href = "javascript:history.back()"><img src="gfx/back.jpg"></a>
 
D

David Dorward

Domestos said:
Is this the best way to implement a 'previous' button?

To not bother. The back button built into the browser is among the very
first things a user will learn when being introduced to the web. As a bonus
is works the same way on every website, so its not a new interface that has
to be learned for each new site.
 
A

Animesh Kumar

David said:
Domestos wrote:




To not bother. The back button built into the browser is among the very
first things a user will learn when being introduced to the web. As a bonus
is works the same way on every website, so its not a new interface that has
to be learned for each new site.

You stole my thought :)

best
A
 
D

Domestos

David Dorward said:
To not bother. The back button built into the browser is among the very
first things a user will learn when being introduced to the web.

But if I needed to ?
 
D

Dan

David said:
To not bother. The back button built into the browser is among the very
first things a user will learn when being introduced to the web. As a bonus
is works the same way on every website, so its not a new interface that has
to be learned for each new site.

....at least, on every website where the author hasn't gone out of
his/her way to disable or otherwise mess with the action of the back
button, such as opening up new windows with no "Back" history, and
auto-refreshing pages so that the back button is hijacked.
Fortunately, some of this stuff can be suppressed by user configuration
settings on better browsers.
 
D

Dan

David said:
To not bother. The back button built into the browser is among the very
first things a user will learn when being introduced to the web. As a bonus
is works the same way on every website, so its not a new interface that has
to be learned for each new site.

....at least, on every website where the author hasn't gone out of
his/her way to disable or otherwise mess with the action of the back
button, such as opening up new windows with no "Back" history, and
auto-refreshing pages so that the back button is hijacked.
Fortunately, some of this stuff can be suppressed by user configuration
settings on better browsers.
 
D

Dan

Domestos said:
But if I needed to ?

Why, because you did something to remove or disable the regular back
button in the user's browser? The best answer is "Don't do that."
 
T

Travis Newbury

Domestos said:
Is this the best way to implement a 'previous' button? How do i deal with
non-javascript enabled browsers? Note : I do not want to implement a link
back to the previous page - i need it to be dynamic...

Are you running into some browsers without a back button?
 
N

neredbojias

Without quill or qualm, Domestos quothed:
Is this the best way to implement a 'previous' button? How do i deal with
non-javascript enabled browsers? Note : I do not want to implement a link
back to the previous page - i need it to be dynamic...

<a href = "javascript:history.back()"><img src="gfx/back.jpg"></a>

You say "Note : I do not want to implement a link back to the previous
page - i need it to be dynamic" so it sounds like a regular old link
would suffice, no?
 
A

Arne

Once said:
But if I needed to ?

Don't your browser have a back button?
I never use sutch links on pages. And not even "close window" links
that I see on pop up pages, I use my browsers little "X" button on the
right top corner for that.



--
/Arne

Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
 
D

Domestos

Heres the reason I needed to do it...

I am using a form an page 1...

on page two I use PHP to validate the form and if there is an error I wanted
to provide the user with a link below the error message so they go back a
page and do not lose the details they have already entered. If I provided a
link to go back to the start of page 1, the users info is lost...

There is probably a way to keep hold of this information in php but I wanted
to go the quick easy route....

What i wanted to know is ' is the javascript the best option and only option
to use?'

Andy Mak
 
G

Grady McGhee

You should the "Close Window" link for people with screen/Braille readers
and people who only use a keyboard. Especially for people who cannot easily
do key combinations.
 
L

Leif K-Brooks

Domestos said:
on page two I use PHP to validate the form and if there is an error I wanted
to provide the user with a link below the error message so they go back a
page and do not lose the details they have already entered. If I provided a
link to go back to the start of page 1, the users info is lost...

<p>Please use your browser's back button to go correct these form
validation errors.</p>

But even better, do it the right way and have PHP redisplay the form
with the values they entered pre-filled.
 
N

Neredbojias

With neither quill nor qualm, Domestos quothed
Heres the reason I needed to do it...

I am using a form an page 1...

on page two I use PHP to validate the form and if there is an error I wanted
to provide the user with a link below the error message so they go back a
page and do not lose the details they have already entered. If I provided a
link to go back to the start of page 1, the users info is lost...

There is probably a way to keep hold of this information in php but I wanted
to go the quick easy route....

What i wanted to know is ' is the javascript the best option and only option
to use?'

One way I can think of is use the html "target" attribute (or js) to
open up a new window for the checking page, but of course with all the
pop-up blockers and quashers out there now...

It's easy to do in js, and I don't know if there's any other non-server-
side way besides what I mumbled already.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top