Go back without using javascript

This is a discussion on "Go back without using javascript" within the JavaScript Forum section. This forum, and the thread "Go back without using javascript are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 14th, 2007, 14:03
New Member
Join Date: Dec 2007
Location: CANADA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Go back without using javascript

Hi all ,

As known to go back we use :
Code: Select all
<A HREF="javascript:history.go(-1)">Go back </A>
Is there any way NOT to use javascript to go back to the pervious page

Thanks in Advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 14th, 2007, 14:21
welshstew's Avatar
Site Admin

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,715
Blog Entries: 14
Thanks: 4
Thanked 33 Times in 31 Posts
Re: Go back without using javascript

I would use the big back button at the top of your browser....

Seriously though, I do not think there is a way to go back in your browser history without some sort of scripting.
__________________
WelshStew Site Admin
If you think I've helped, click the "Thanks"
tierney rides tboard - uk site | xtreme wales - extreme clothing
WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 14th, 2007, 14:30
Highly Reputable Member
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

HTML is static!
COMPLETELY STATIC, DEAD, INACTIVE.....
HyperText Markup Language....
It FORMATS text and nothing else....!!!

</outburst>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Dec 14th, 2007, 14:35
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Quote:
Originally Posted by c010depunkk View Post
HTML is static!
COMPLETELY STATIC, DEAD, INACTIVE.....
HyperText Markup Language....
It FORMATS text and nothing else....!!!

</outburst>
Hmmm ... are you trying to tell us something? :rofl:

To OP ... no ... without JS or using the browsers' back button or right-click on the page and select Back or the ALT + left arrow, there is no way of going back to the previous page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Dec 14th, 2007, 14:43
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Don't try to build a complete user interface for your site. That's what a browser is for!

Let them use the back button.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Dec 14th, 2007, 16:37
Highly Reputable Member
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Quote:
Originally Posted by karinne View Post
Hmmm ... are you trying to tell us something? :rofl:
Yeah, that you can't do this with HTML
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Dec 14th, 2007, 16:51
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,794
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Go back without using javascript

haha... Good answer Jan!!!
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Dec 14th, 2007, 17:04
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,341
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
Re: Go back without using javascript

On a serious note

Could a spot of PHP and the use of $_SERVER['HTTP_REFERER'] be put to use?

Something like
PHP: Select all

<?php
if (isset($_SERVER['HTTP_REFERER'])) {
echo 
'<a href="'.$_SERVER['HTTP_REFERER'].'">Go Back</a>';
}
?>
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Dec 14th, 2007, 20:48
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,794
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Go back without using javascript

Yes, you can do that and it will work.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Dec 14th, 2007, 21:40
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Doesn't work for me...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Dec 14th, 2007, 21:53
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

It works fine for me. Are you sure that your server supports the HTTP_REFERRER superglobal?

Or maybe you just made a direct access to the page and there is no referrer?

Check the source and see what it has in the link.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Dec 14th, 2007, 22:48
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,794
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Go back without using javascript

It also works for me.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Dec 15th, 2007, 00:18
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Oh, sorry guys! It's disabled on my server...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Dec 15th, 2007, 06:53
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Go back without using javascript

Sort of defeats the purpose though because a lot of browsers and servers don't set the HTTP_REFERER variable, not mention the fact that because it's a HTTP header, it can be modified.

Better off sticking with javascript (with a fallback to the HTTP header) or hard coding the links.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
opera, back button & javascript interval paza JavaScript Forum 4 May 23rd, 2008 21:19
Back buton - several pages back - in HTML ? attila001122 Web Page Design 1 Dec 9th, 2007 15:51
Post back to default page when generate javascript deepgrid in asp.net zacklau JavaScript Forum 1 Oct 2nd, 2007 10:18
Problem with Javascript Back Button in Firefox gorikain JavaScript Forum 4 Jun 25th, 2007 22:23


All times are GMT. The time now is 05:58.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42