I have a click event on Jquery, I am getting arrays with help of $.ajax and post, after that I am calling another procedure in a loop . Second procedure has a $.ajax too , is it allowed ? My script seems not working, I dont know what would wrong ? Just give me any hint or clue please And feel free to ask any questions
代码 :
$("#list").click(function(){
var ptext ="";
$.ajax({
type: "POST",
url: "phpname.php",
data: ({
newtask: "grab"
时 时),
dataType: "json",
success: function(data){
$.each(data, function(key, value) {
ptext=value.name;
parseclick(ptext);
时 时);
时 时
时 时);
时 时);
时 时);
function parseclick(ptext)
{
$.ajax({
type: "POST",
url: "phpname.php",
data: ({
grab_ads : "grab",
list_url : ptext
时 时),
dataType: "html",
success: function(msg){
$("#all_name").append(msg);
var part= msg.split("#url#");
$("#current_num").val(part[0]);
时 时
时 时);
时 时);
时 时