In page header have:
<script type="text/javascript">
var recordAddedSuccess = false;
</script>
This can be anywhere on the page as long as it is UNDER recordAddedSuccess definition.
<script type="text/javascript">
function showMessage() {
if (recordsAddedSuccess)
alert('Record Added Successfully');
recordsAddedSuccess = false;
}
$(document).ready(function() { showMessage(); });
</script>
In your register script server side, set recordAddedSuccess = true; When the page loads, the method will execute and your message will be shown.
If this helps please take time to accept the solution. Thank you.