The above html code was an test data to get some idea. Below is my html code with javascript in file .js as included in head:
<!DOCTYPE html>
<html>
<head>
<script src="http://sms24x7india.com/mobiledata.js" type="text/javascript"></script>
</head>
<body>
<form>
<label>Enter Mobile No.:</label><br />
<input type="text" name="txtPhnNumber" id="txtPhnNumber" maxlength="10" >
<br />
<input type="button" name="btnshow" id="btnshow" onclick="return PhoneDetails();" >
<br />
<div align="center">
<div id="name" style=" font-weight:bold" align="center"> </div>
<div id="company" style=" font-weight:bold" align="center"> </div>
<div id="idnumber" style=" font-weight:bold" align="center"> </div>
<div id="information" style=" font-weight:bold" align="center"> </div>
</div>
</form>
</body>
</html>
Live action:
http://sms24x7india.com/test.html
My Goal:
When user enter a 10 digit number in the text field say 9999999999 then a select box will auto-select a service provider according to text field data entered. Similarly another select box below it auto-select the state based on data entered in text field.
Currently, i can show all the data outside the select box when user enter a 10 digit number in text field and click on button.
This is the exact live example a website using that i want am trying to do:
https://www.paytm.com/
(In this site when you enter 9999999999 in the text field then mobile operator select box auto-select to "Vodafone")
Any idea, how to do that please?