Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

smarty con jquery,

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
robincasas
Smarty n00b


Joined: 06 Feb 2008
Posts: 2

PostPosted: Wed Feb 06, 2008 3:10 pm    Post subject: smarty con jquery, Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP