I was using isNaN function in a Facebook application, but it was not working. the code that i was using
<script type="text/javascript">
<!--
function postValid(form)
{
var values=document.getElementById("phone").getValue();
if(isNaN(values))
{
var myDialog = new Dialog(Dialog.DIALOG_POP);
myDialog.showMessage('Almost Done!', 'Correct Mobile Numbers', button_confirm='Close');
}
else
{
var myDialog = new Dialog(Dialog.DIALOG_POP);
myDialog.showMessage('Almost Done!', 'Please Enter Correct Mobile Numbers Please', button_confirm='Close');
}
}
//-->
</script>
I have also used Regular expression but not working is there any alternative? or method by FBJS?