.Ajax unable to find url
.Ajax unable to find url
Hi guys,
Been stuck with this problem on my ajax request
Here is the scenario. Im using this script for searching items once it finds the items. it displays the items on this div container #dataTable, This items contains multiple forms with unique ids
After that ive binded $(".measurement_submit").click(function() on those forms. Ive binded it successfully because it retrieves all the fields in each form.
However it wasnt able to access the url. Ive used firebug if its pointing to the correct url. It displays correct url and works if go to it directly.
But once it is processed to ajax it isnt working..
Any ideas or suggestions is highly appreciated
Thanks in advance
-
$(document).ready(function(){
$("#searchForm").validate({
submitHandler: function(form) {
$.ajax({
url: _bURL,
data: {style_no:$("#cstyleno").val()},
success: function(response){
$("#dataTable").html(response);
},
complete: function(){
$(".measurement_submit").click(function(){
var element = $(this);
var Id = element.attr("id");
var str = Id.substring(7);
var _data = $("#form_"+str).serializeArray();
$.ajax({
url: '/b1/update.php',
type: "POST",
data: _data,
cache: false,
success: function(response){
alert(response);
},
error:function(error){
alert('error');
}
});
});
},
error:function(error){
},
type: "Post",
dataType: "html"
});
}
});
});