if i change "ejemplo.html" for "example.php" error.
if i change for this:
$(document).ready(function(){
$.ajax({
type: "POST",
url: "uno.php",
data: "nombre=juan&apellido=luna",
success: function(datos){
alert(datos);
}
});
});
script run!.
before not.
--------------------------------------------------
From: "brian" <[email protected]>
Sent: Wednesday, November 04, 2009 11:00 PM
To: <[email protected]>
Subject: Re: [jQuery] [ ajax jQuery]
Normally, one would direct an AJAX request to some server-side script
(eg. PHP, Python, Perl, etc.) not a plain HTML page.
On Wed, Nov 4, 2009 at 8:55 PM, Lord Gustavo Miguel Angel
<[email protected]> wrote:
Hi,
Why this code not is ok?
-----8<-------------------
$(document).ready(function(){
$(".button").click(function(){
$.ajax({
url: "ejemplo.html",
success: function(datos){
alert(datos);
}
});
});
});
----->8------------------
When y click en Button it not show "datos".
thank“s