The code below is supposed to take an input in a textbox and upon the click of a button call a function to check the input.
I cannot get this to work at all the text box and button appear but the code for the function appears on the page and the button press does nothing.
Any advice here please ?
// Creates text box for bank sort code to be entered
<p>The layout used in this input is three pairs of numbers seperated by -. Thanks for taking the time to read this!</p>
<input type=”text” name=”Bank_Sort_Code” maxlength=”8″ />
<p><input type=”button” value=”Click here” onClick=”validateBankNo();”></p>
<script language=”javascript” type=”text/javascript”>
function validateBankNo()
{
if(ereg(‘^[0-9]{2}-[0-9]{2}-[0-9]{2}$’, $Bank_Sort_Code))
return True;
else
return false;
}
</script>