-1

hello friends i have a ajax call for update a p tag html. i work fine in firefox and opera but not work in chrome and ie

function updatepart() {
     var count = jQuery('.abc').length;
     var bbb = count - 1;
     var partno = $("#partno-"+bbb+"").val();
     var ptname = $("#ptname-"+bbb+"").val();
     var brandname = $("#brandname-"+bbb+"").val();
     var modelname = $("#modelname-"+bbb+"").val();
     $.ajax({
    type: "POST",
    url: "http://computerdada.com/get_updatepart.php",
    data: "partno="+ partno +"&id="+ bbb +"&custname="+ ptname +"&brandn="+ brandname +"&modeln="+ modelname,
    cache: false,
    success: function(data)
    {
    $('#'+bbb).html(data);
    $("#partdetails-"+bbb ).focus();
    }
    });

   }

and my php code is

<div id="main">
  <span id="track1" class="abc">
  <p id="0">
  <input type="text" name="ptname[]" id="ptname-0" class="ptname" value="" placeholder="Party Name" /><input type="text" name="brandname[]" id="brandname-0" class="brandname" value=""  placeholder="Brand Name" /><input type="text" name="modelname[]" id="modelname-0" class="modelname" value=""  placeholder="Model" /><input type="text" name="partno[]" id="partno-0" class="partno" value=""   placeholder="Part Number" onchange="return updatepart();"/><input type="text" name="partdetails[]" id="partdetails-0" class="partdetails" value=""   placeholder="Configration"/><input type="text" name="qty[]" id="qty-0" value="" size="4"  placeholder="Qty" onchange="return updateprice();" /><input type="text" name="pricein[]" id="pricein-0" class="pricein" value=""  placeholder="Price In" /><input type="text" name="priceout[]" id="priceout-0" class="priceout" value=""  placeholder="Price Out" onchange="return track();"/>
  <input type="checkbox" name="status[]" id="status-0" value="confirm" size="4" /></p></span>
 </div>

it call onchange attribute of partno textbox.

for check it please visit http://computerdada.com/parts.php it code work fine in firefox and chrome but in ie and chrome not working it please help me

  • Could relate to this: http://stackoverflow.com/questions/70579/what-are-valid-values-for-the-id-attribute-in-html – gratz Jul 29 '14 at 06:23
  • 1
    working fine in chrome, i've given 2 as input to part number texfield and some related data comes through the ajax – ɹɐqʞɐ zoɹǝɟ Jul 29 '14 at 06:24

1 Answers1

0

I'd that problem. Try using .change jQuery function http://api.jquery.com/change/

$(document).ready(function(){


    $('input').change(function(){    
        // Your code
    });

});
cnavarreteliz
  • 94
  • 1
  • 3
  • 9