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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -