Assign a back one step control to a button (SOLVED)

Help! … please.

I am trying to assign an internet web page type goback action to a button.

I am in browse mode and I have disabled the back_page button as I wish to have the back button activate like the back button in a web browser, and not take me back to the previous page. This will allow people to navigate within the same page and reverse their steps.

So…

I have inserted another button to which I would like to assign a function similar to the javascript.history(-1) and hidden the original ‘back’ button.

I have read through the scripting wiki and help, but can find no apparent way to do this.

I imagine that I can assign a Global function to do the job but lack the syntax knowledge.

Can yo help?

Maybe you could try ExecuteHTMLScript? See http://www.htmlexe.com/help/scriptreference.htm (Executes a script function in an HTML page (JavaScript, VBScript…). Only available for IE publications).

Write an HEScript function that would call ExecuteHTMLScript, and assign your button to that HEScript function.

[quote=“gdgsupport”]Maybe you could try ExecuteHTMLScript? See http://www.htmlexe.com/help/scriptreference.htm (Executes a script function in an HTML page (JavaScript, VBScript…). Only available for IE publications).

Write an HEScript function that would call ExecuteHTMLScript, and assign your button to that HEScript function.[/quote]

This is what I’m trying to do. I have been through the documentation but somehow I’m not implementing correctly and an error is created.

The NavigateCommand() procedure seems to be what I need… but I have no idea how to call it from a toolbar button.

I have tried calling it from the go to URL in the toolbar buttons using:

hescript://Macros.MacroGoPage(GOBACK)

This throws up errors.

So my questions are:

Where should I assign a procedure call from the toobar buttons? In the gotoURL or “execute this script function” field?

What is the correct syntax to call a javascript from the “execute this script function” field?
Where do I write the javascript - in its own document or using the scripts management tool in HE?

Do I have to write a procedure using HEscript? What is the call in this case?

I am very familiar with javascript and actionscript and can use your examples in the procedures already written, but I have no experience of calling them.

I solved the problem by assigning a script to make a button that steps forward (instead of back). Then I removed the standard step forward button and set the publication to history mode…

cushti