jquery - jsfiddle - Simple Ajax request -


i beginner jquery , trying call simple request. here's jsfiddle:

http://jsfiddle.net/xvrnl/

i using code:

html: <button>click me</button> 

and

jquery: $("button").click(function() {     $.ajax({         url: "http://jsfiddle.net/echo/html/",         success: function(result) {             alert("data: " + result);         }     }); }); 

but doesn't work. reading documentation doesn't me. can suggest solution?

thank much

........

these reasons problem:

  1. you have refer jquery library reference jsfiddle
  2. you cant use absolute urls ajax requests. please refer following answer more information.

$.ajax call working fine in ie8 , doesn't work in firefox , chrome browsers


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -