I am trying to run a javascript function when control comes out of a field(AWSID). Getting the following error: Uncaught ReferenceError: getCustomerName is not defined at HTMLInputElement.onblur (ipwhitelistindex:12) onblur @ ipwhitelistindex:12
Please help me out.
{% extends 'base.html' %}
<html>
<body>
<script type ="text/javascript">
function getCustomerName() {
alert('get customer name called....');
}
</script>
{% block content %}
<h1>IP Whitelisting</h1>
<form name = "ipwhitelistindex" action = 'ipwhitelisting' method = "post">
{% csrf_token %}
<center>
<table>
<tr><td>Enter AWS Account Id </td><td>:</td><td><input type = 'text' name = AWSID onblur="getCustomerName()"></td></tr>
<tr><td>Customer Name </td><td>:</td><td><input type = 'text' name = CUSTNAME style = "background-color : lightgrey" readonly></td></tr>
<tr><td>Enter list of IPS seperated with(,) </td><td>:</td><td><input type = 'text' name = IPS></td></tr>
<tr><td>Enter description </td><td>:</td><td><input type = 'text' name = DESC></td></tr>
</table><br>
<input type = 'submit' value = 'submit'>
</center>
</form>
{% endblock %}
</body>
</html>