Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1935 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Back button in Firefox

Thread title: Back button in Firefox
Closed Thread    
    Thread tools Search this thread Display Modes  
05-09-2007, 09:41 PM
#1
chaka42 is offline chaka42
Status: Senior Member
Join date: Apr 2005
Location: Middle America
Expertise:
Software:
 
Posts: 955
iTrader: 5 / 100%
 

chaka42 is an unknown quantity at this point

Send a message via AIM to chaka42 Send a message via MSN to chaka42 Send a message via Skype™ to chaka42

  Old  Back button in Firefox

I'm sure most of you are aware of Firefox's quirk with the back button. Not the one on the browser, but regular anchor on a page that goes back 1 page when clicked on.

I'm using the simple
Code:
onClick="history.go(-1)"
but want know if anybody knows of a fix for Firefox on Mac. It goes back one page, but, after a second or so, returns to initial page with the back button.

Any help would be greatly appreciated. And yes, Javascript is enabled.

Thanks.

05-12-2007, 10:21 PM
#2
ChrisM is offline ChrisM
ChrisM's Avatar
Status: Junior Member
Join date: Mar 2007
Location: Cape Town, South Africa
Expertise:
Software:
 
Posts: 96
iTrader: 0 / 0%
 

ChrisM is on a distinguished road

Send a message via MSN to ChrisM

  Old

I don't know why it is doing that, I am using that exact javascript on a site of mine, and it's working perfectly.

However, PHP has a function called HTTP-REFERRER, which displays the url of the page which the person was previously at, you could use that..

06-19-2007, 07:03 PM
#3
Andrew R is offline Andrew R
Status: Request a custom title
Join date: Dec 2005
Location: Arizona
Expertise:
Software:
 
Posts: 5,200
iTrader: 17 / 95%
 

Andrew R is on a distinguished road

  Old

Sorry for the late reply, but I thought I'd point something out incase someone used Chris' advice.

Chris, yes, but not all users use referring links. When I go to a site, let's say YouTube, I'll type it into my address bar, hence there wouldn't be a referrer to go back to. Though, it could work in theory, it wouldn't work all the time.

06-22-2007, 12:00 AM
#4
bluesaga is offline bluesaga
Status: Member
Join date: Feb 2007
Location:
Expertise:
Software:
 
Posts: 137
iTrader: 1 / 100%
 

bluesaga is on a distinguished road

  Old

if you want something pretty simple yet effective use something like:
PHP Code:
<?php
$referer 
$HTTP_REFERER;

if(
$referer != "")
{
   
$link "<a href='".$referer."'>Back</a>";
}
else
{
   
$link "<a href='#' onClick='history.go(-1)'>Back</a>";
}

?>
If a referer is there, then use that else, attempt to use browsers back button. Should help you some of the time

09-05-2007, 12:41 PM
#5
Shadows is offline Shadows
Status: I'm new around here
Join date: Sep 2007
Location:
Expertise:
Software:
 
Posts: 4
iTrader: 0 / 0%
 

Shadows is on a distinguished road

  Old

wow that's a nice idea! that sure helps me...
Thanks a lot mate!!

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed