# New Twist on Back Button Question

**URL:** https://forum.kirupa.com/t/new-twist-on-back-button-question/26287
**Category:** flash
**Created:** [July 21, 2003, 6:20pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287 "2003-07-21T18:20:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sttuffy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sttuffy](https://forum.kirupa.com/u/sttuffy)
#### Post date: [July 21, 2003, 6:20pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/1 "2003-07-21T18:20:42Z")

</div>

Hey all, I’ve put a button in my swf to take the user out of my site and back to the search engine (or wherever they came from), and I searched kirupa and came up with:  
[AS]on (release) {  
if (\_root.y != 1) {  
getURL(“javascript:history.go(-2)”, “\_self”);  
}[/AS]

I put -2 because there is a flash detection page before the page with the swf. But, here is the weird part… it only works the second time it is clicked. You click it once, and nothing happen, but if you click it again, it takes you back to the correct page, weird! I am not too up on Javascript, so I was hoping someone could point out my mistake 🙂 Please go [HERE](http://www.scottandchristie.com) to view the site, thanks in advance for your help!

PS, any comments on the site would be appreciated too :beam:

EDIT: obviously, the “about:” is supposed to be javascript  
EDIT: oh screw it, you know what im trying to say :trout:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2003, 6:32pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/2 "2003-07-21T18:32:37Z")

</div>

[offtopic]  
is that your page, or are you making it for someone?  
jw, cuz eyedoctors r cool… lol  
[/offtopic]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2003, 6:52pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/3 "2003-07-21T18:52:38Z")

</div>

[offtopic]Heh, I am a multi-talented eye-doctor 😉 jk, I am just making the website for them :)[/offtopic]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2003, 7:02pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/4 "2003-07-21T19:02:01Z")

</div>

try -3 instead of -2.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2003, 7:07pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/5 "2003-07-21T19:07:39Z")

</div>

Thanks for the idea dPimp, but it doesn’t help, changing to -3 just goes one page farther back on the second click.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2003, 7:48pm UTC](https://forum.kirupa.com/t/new-twist-on-back-button-question/26287/6 "2003-07-21T19:48:16Z")

</div>

hey i had the same sort of problem with going back just once! i found that i had to click the button twice to be able to go back just once, and if i set it to -2 then it would go back twice which i didnt want. Annoying problem !!!

Chris
