tags:

views:

392

answers:

1

Hey all,

I'm messing with using AJAX to fetch "partial templates" from the server and echoing them back to the browser. This will cause all this HTML to have to be sent back to the browser. I was wondering if there is a way to simply change the variables but leave all the html there. Something like this:

$smarty->assign("fruit", "apple"); // At Load

$smarty->assign("fruit", "pear"); // Changed through an AJAX call..

Then something like..

$smarty->reload('FruitTemplate'); // Reloads all the variables

Any ideas?

Thanks! Matt Mueller

A: 

I'm afraid Cfreak is right smarty works on the server, essentially you are doing exactly what you say you want to do on the client on the server. The only way to do what you want would be through javascript.

However is it really a problem. unless you html files are huge it shouldnt cause any problems for you.

Toby Allen