Javascript Question

history.boBack(-1)

Page 1 of 1

5 Replies - 5367 Views - Last Post: 16 July 2002 - 09:08 AM

#1 caffinephreak  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 229
  • Joined: 08-July 02

Javascript Question

Posted 16 July 2002 - 03:54 AM

ive seen a script before where its just like hitting the back button, i think its something like 'history.goBack(-1)' not sure, can anyone help me?
Is This A Good Question/Topic? 0
  • +

Replies To: Javascript Question

#2 supernova333  Icon User is offline

  • D.I.C Addict

Reputation: 4
  • View blog
  • Posts: 590
  • Joined: 12-March 02

Re: Javascript Question

Posted 16 July 2002 - 05:15 AM

Yeah the code is:

history.go(-1)


You could add it to a link:

<a href="#" onclick="history.go(-1)">Back or <img src="backbutton.gif"></a>

Was This Post Helpful? 0
  • +
  • -

#3 caffinephreak  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 229
  • Joined: 08-July 02

Re: Javascript Question

Posted 16 July 2002 - 05:18 AM

ok, thanks
Was This Post Helpful? 0
  • +
  • -

#4 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

Re: Javascript Question

Posted 16 July 2002 - 07:41 AM

or you can put it right in the href:
<a href="javascript:history.back(1)">



:)
Was This Post Helpful? 0
  • +
  • -

#5 caffinephreak  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 229
  • Joined: 08-July 02

Re: Javascript Question

Posted 16 July 2002 - 08:24 AM

sweet, thanks again for helpin out a newbie
Was This Post Helpful? 0
  • +
  • -

#6 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

Re: Javascript Question

Posted 16 July 2002 - 09:08 AM

what happens if there's no number in between the parenthesis?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1