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 exisiting mobile value and fail to disable submit button When I passed value in text field by value = “<?php echo $mble; ?>” following code

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

and here is my script code

<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 (){}

Define “fails to check” - does it execute the function? Does it send the AJAX request? Does the AJAX request come back with the right value?

by adding this in java script code, my code start working


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.