![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 goosfancito (AT) gmail (DOT) com> 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 |
#4
| |||
| |||
|
|
Normally, one would direct an AJAX request to some server-side script (eg. PHP, Python, Perl, etc.) not a plain HTML page. |
|
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" <zijn.digital (AT) gmail (DOT) com Sent: Wednesday, November 04, 2009 11:00 PM To: <jquery-en (AT) googlegroups (DOT) com 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 goosfancito (AT) gmail (DOT) com> 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 |
#5
| |||
| |||
|
|
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" <zijn.digital (AT) gmail (DOT) com Sent: Wednesday, November 04, 2009 11:00 PM To: <jquery-en (AT) googlegroups (DOT) com 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 goosfancito (AT) gmail (DOT) com> 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |