To start with, use a tool like Firebug (for Firefox) or Fiddler (for
IE) to make sure the code is seeing the right URL
Second, dealing with a NET web service is a little tricky... if you
head over to Rick Strahl's blog, he has an excellent posts with talk
and examples of using jQuery against web services....
Once you get deeper into using the framework, i'd suggest looking into
using generic handlers and the library JSON.NET
Good luck...
On Sep 28, 10:05 pm, LSUDVM <[EMAIL PROTECTED]> wrote:
> I am attemptin to use jquery to do check username while filling out a
> form. I have already done it with MSAJAX but i thought it would be fun
> to do it with jquery. However it does not work Can anyone point out
> where i am going wrong? I am using the jquery ajax method to call a
> codebehind WebMethod. The WebMethod works since it the same one i used
> for the MS AJAX version.
>
> Thanks,
> Ashok
>
> Here is the jquery:
>
> <script type="text/javascript" >
> var $j = jQuery.noConflict();
> $j(document).ready(function() {
>
> $j("#<%=Textbox1.ClientID %>").blur(function() {
> $j.ajax({
> type: "POST",
> url: "jquerysample.aspx/CheckUserName",
> data: $j("#<%=Textbox1.ClientID %>").val(),
> contentType: "application/json; charset=utf-8",
> dataType: "json",
> success: function(result) {
>
> if (result == true) {
> $j("#divChecking").text(result)
> }
>
> else {
> //do domething else here
>
> }
> }
>
> });
> });
> });
>
> </script>