I have a form that I pre-populate with test data though jQuery.
$('INPUT[name=subscription.FirstName]').val('Jef');
but I only want to do this before submit. What is the best way to test this?
I have a form that I pre-populate with test data though jQuery.
$('INPUT[name=subscription.FirstName]').val('Jef');
but I only want to do this before submit. What is the best way to test this?
Depends on the server side view technology you're using. If it is for example JSP:
<script>
var isPostback = ${pageContext.request.method == 'POST'};
</script>