$.ajax({
type: "POST",
url: "WebGlobalMethods.asmx/NameIsAvailable",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg)
{
if (msg.d != "false")
{
$("tr:not(:has(th),:contains('" + msg.d + "'))", "table[id*='gvShipping']").hide();
}
},
error: LoadFailed
});
ASKER
$(document).ready(function ()
{
var loc = window.location.href;
if (loc.indexOf("CreateNewUser") != -1)
{
// alert("check if user name avail");
var msg;
$.ajax({
type: "POST",
url: "WebGlobalMethods.asmx/NameIsAvailable",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: '{ "newusername" : "max" }',
success: function (msg)
{
alert("success");
},
error: function (msg)
{
alert("failed: " + msg.d);
}
});
}
});
ASKER
jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.
TRUSTED BY
ASKER
my jquery:
Open in new window
my web method (web service call):
Open in new window
In my jquery, this part is getting called:
error: function (msg)
{
alert("failed: " + msg.d);
}
The message that appears at runtime is
failed : undefined
Is there a way to make the message more verbose?