I\'m trying to create a widget (which is basically an iframe) that would have its own back and forward buttons. That is, when I hit the widget back-button, only the iframe goes
Since your widget and the page are hosted under different domains for sequre reasons you won't get access from iframe to the parent page by scripts.
Try this:
<a class="button" href="#" onclick="parent.history.back();return false;">