Comunidad de diseño web y desarrollo en internet online

Problema AJAX básico :S

Citar            
MensajeEscrito el 14 May 2006 03:26 pm
Bueno, tengo un problema con AJAX y aqui vine por ayuda...
Me apoyé en el tutorial de AJAX de Clab para crear las funciones básicas, y todo va bien... pero quería hacer que haga la funcion al enviar un formulario...
El Javascript:

Código :

function formajax () {
   var inp = document.getElementById('txt');
   var txto = inp.value;
   llamarasincrono('texto.php?texto=' + txto, 'contenidos');
   return false;
}

El xHTML:

Código :

<form action="" onsubmit="return formajax()">
<input type="text" id="txt" /><input type="submit" />
</form>

El PHP (texto.php):

Código :

<?
echo $texto;
?>


De antemano, gracias :)

Por Alan

470 de clabLevel

2 tutoriales

 

firefox
Citar            
MensajeEscrito el 14 May 2006 08:08 pm
Para que se preocupan? :P
Ya lo tengo listo, lo hice todo de nuevo desde cero:
http://alanorozco.villavicastur.com/pruebas/prueba_ajax/
Saludos

Por Alan

470 de clabLevel

2 tutoriales

 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.