|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
robincasas Smarty n00b
Joined: 06 Feb 2008 Posts: 2
|
Posted: Wed Feb 06, 2008 3:10 pm Post subject: smarty con jquery, |
|
|
Saludos, tengo un problema que cuando quero pintar algo, el smarty me vuelve a pintar todo el html del tpl + lo que quiero pintar claro. Mi codigo es el sig.
/*index.tpl*/
<form name='reminder' id='reminder'>
User: <input name="user" id="user"><br/>
Clave: <input name="clave" id="clave"><br/>
<input type="button" value="Ingresar" id="boton1" />
</form>
/*index.php*/
$smarty = new Smarty();
$rr=$_POST['c1'];
$smarty->assign('resultados',$rr);
$smarty->display("index.tpl");
/*java.js*/
var x;
x=$(document);
x.ready(inicializarEventos);
function inicializarEventos()
{
var x;
x=$("#boton1");
x.click(presionSubmit);
}
function presionSubmit()
{
var vuser=$("#user").attr("value");
var vclave=$("#clave").attr("value");
$.ajax({
async:true,
type: "POST",
dataType: "html",
url:"h.php",
data: formVars,
success:llegadaDatos,
});
return false;
}
function llegadaDatos(datos)
{
$("#resultados").text(datos);
}
Gracias por sus respuestas..!! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|