Rendered HTML link to a different frame?

I am filled a dynamic text box with HTML from a variable. How can I use a href within that HTML to link to another frame.

<a href="gotoAndStop(54);">

eh?

I’m sure there is some easy answer like

<a href="actionscript:gotoAndStop(54);">

, but please educate if you can.