How to "window.history.back();" in to button?

I would like to incorporate the script from http://www.w3schools.com/jsref/met_his_back.asp in to a button on a scene.

How do i go about making a button perform the documented function?

Try looking here...

Sorry i probably wasn’t clear enough in my initial post. I would like to have the button perform the back function to the previous item in their browsing history. So send them back to the site they came from before reaching mine.

Ooppsss. Try

window.history.go(-1);

It won’t work while previewing because nothing will be in the history

You can test it by going forward, – preview your hype file then go to google.com then hit the back button to go back to you Hype preview with a button that has this script attached to it.

window.history.forward();
1 Like

Your a legend :grin:

1 Like