Reputation: 1628
I'm looking to check the page for changes and alerting the user before they leave if items have not been saved. Is it possible to use onBeforeOnLoad with a PageLink from Tapestry? I've tried and so far have had no luck. Thanks.
Upvotes: 0
Views: 75
Reputation: 23186
Assuming you meant onbeforeunload
, which is javascript and wouldn't have anything do with your page link. Instead, add a script tag at the end of your page with the snippet below:
<script type="text/javascript">
window.onbeforeunload = function() {
return true;
};
</script>
See this answer for more info.
Upvotes: 1