Oninput event not working when value in text field is passed from another form

oninput event work absolutely fine whenever I entered mobile number in my small form text field. (as on entering, its show text that number already exist and disable submit button) . But its fails to check existing mobile value and fail to disable submit button When I passed value in text field by value = following code

`<label>Mobile:</label> <input type="text"  name= "mble"  id= "mble" value="<?php echo $mble; ?>" class="form-control" Required maxlength = "12"  oninput="checkAvailability()">`

here is my java script

`<script type="text/javascript">     

function checkAvailability() {
url: "proceser.php",
type: "POST",
if(data == "<span class=''> Mobile No already exist.</span>") {
$('#submit').prop('disabled', true);
else $('#submit').removeAttr('disabled');
error:function (){}

>Solution :

Did you try triggering oninput function manually?


Leave a Reply