If i'm using a script like this for a comment section:

<script>window.onbeforeunload = function() { return "Sure?"; }</script>

I don't want it to ask if they select the "add comment" button... it's basically a reminder for if they begin to navigate away without adding the comment.. any help would be greatly appreciated. Thanks.

Is it causing conflict because i already have an onClick event?

<input type='button' value='Clear' onClick="setval('CATEGORY',''); document.getElementById('CATNAME').innerHTML = '';">