
<script type="text/javascript" src="/_layouts/style/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('[id*="toolBarTbltop"]').closest('table').hide();
$('[id*="toolBarTbl"]').closest('table').hide();
$('[id="OK"]').bind('click',function(){
alert($('input[title="Title"]').val());
if($('input[title="Title"]').val()=="a")
{
return false;
}
else
{
$('[id*="SaveItem"]:first').click();
}
});
$('[id="testCancel"]').bind('click',function(){
$('[id*="GoBack"]:first').click();
});
});
</script>
<input name="testOK" class="ms-ButtonHeightWidth" id="testOK" accessKey="O" type="button" target="_self" value="OK"/>
<input name="testCancel" class="ms-ButtonHeightWidth" id="testCancel" accessKey="O" type="button" target="_self" value="Cancel"/>