If you are using an HTML Widget (an iframe) and need to communicate to a parent document, you could do so with a little bit of JavaScript code in the anchor tag that would look something like:
<a href = "#" onclick = "parent.window.HYPE.documents['index'].triggerCustomBehaviorNamed('behaviorName')">text link</a>
You'd need to replace index with the name of your document (note previewing always uses "index"), and behaviorName I'm using in this case as you could make a Custom Behavior to run actions, though any other item in the JavaScript API could be called.
This only works from parent to child, and they iframe must be in the same domains otherwise it will be a security policy issue. Beyond this, the method you'd need to communicate is postMessage; there was just a thread about this recently: