stupidajax: function()
{
var varpas=$j('#somediv',window.parent.document).text();
varpas.replace(/\s/g, "");
$j.ajax({ // Start AJAX function
url: 'mysqlcall.php', //script
async: false,
data: "parameter1="+varpas, //you can insert url argumnets here to pass to api.php
//for example "id=5&parent=6"
dataType: 'json', //data format
success: function(data) //on recieve of reply
{ //start success function
var selecthtml='Things: <select name="d" id="d">'
for (var i=0;i<data.length;i++)
{ //start for
var r = data[i];
var n = r[0];
var c = r[1];
if (i==0)
{
selecthtml=selecthtml+'<option value="'+c+' selected="selected">'+n+'</option>';
}
else
{
selecthtml=selecthtml+'<option value="'+c+'>'+n+'</option>';
}
} //end for
selecthtml=selecthtml+'<option value="Default">Default</option>';
selecthtml=selecthtml+'</select>';
} //end success
complete: function(data)
{
alert("hi"); // <----line that pisses me off
}
}); //end ajax function
},
Im trying to print that hi alert AFTER I load up the combobox but it always comes out first. I thought the complete function was able to do that but it does not do it. What is the best way to print it out?
I want to say that I dont want to just print out a alert, I want to do something else but once I get that alert out there, I can move on to something more complicated (the image loading)
Thank you