By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,945 Members | 1,328 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,945 IT Pros & Developers. It's quick & easy.

Back link

100+
P: 347
I have a page that has an iframe in it that plays mp3 clips with the click of a link in the outer page, the problem is that if i put a javascript: history.go(-1) link on the button it does not go back to the previous page it just steps back i have a variable that keeps track of the number of links to play files is clicked but cannot work out how to include this in the javascript: history.go(-1) link
the variable is called clicks and i have tried various versions of the following javascript: history.go(-"clicks") but cannot work it out....please help, thanks
May 23 '08 #1
Share this Question
Share on Google+
3 Replies


hsriat
Expert 100+
P: 1,654
Try history.go(((-1)*clicks))
May 23 '08 #2

100+
P: 347
PERFECT thankyou works fantastic
May 23 '08 #3

hsriat
Expert 100+
P: 1,654
PERFECT thankyou works fantastic
You are welcome...

When you include a variable name in quotes, its considered as string, not the variable name.
And to make a variable -ve, you have to multiply the variable with -1. Prefixing a -ve sign won't work.

Regards
May 23 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.