Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Please Help Refresh portion site

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
andreycosmin
Smarty Rookie


Joined: 05 Feb 2013
Posts: 8

PostPosted: Tue Feb 05, 2013 1:31 pm    Post subject: Please Help Refresh portion site Reply with quote

I have this .tpl file

Code:

{include file="header.tpl"}
   
         {include file="sidebar.tpl"}
      
         <div id="items" class="main">
            
            <h2>{$translations.titles.companies}</h2>
               
            <form action="" class="box search" method="get" accept-charset="utf-8">
               
               <fieldset class="content">
                  
                  <ul>
                  
                     <li class="semi"><label for="country">{$translations.labels.country}</label>
                     <select name="country" id="country">
                        <option value="0">{$translations.labels.any}</option>
                        {html_options options=$options.countries selected=$params.country}
                     </select></li>
                  
                     <li class="semi"><label for="city">{$translations.labels.city}</label>
                     <input type="text" class="text autocomplete city" name="city" value="{$params.city}" id="location_start" /></li>
                     
                     <li><label for="keywords">{$translations.labels.keywords}</label>
                     
                     <input type="text" class="text autocomplete company" size="40" name="keywords" value="{$params.company}" id="keywords" />
                     
                  </ul>
                  
                  {include file="search-tabs.tpl"}
                  
               </fieldset>
               
            </form>
            
            {include file="user-access.tpl"}
               

------------------------------------------------------------------------//// I want refresh this portion

            {include file="companies-list.tpl"}


----------------------------------------------------------------------//// end
            
{include file="footer.tpl"}






Please help .... I want to refresh this file after 20 seconds
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7281
Location: Lincoln Nebraska, USA

PostPosted: Tue Feb 05, 2013 2:19 pm    Post subject: Reply with quote

Put in the <head></head> of your document:

Code:
<meta http-equiv="refresh" content="20">
Back to top
View user's profile Send private message Visit poster's website
andreycosmin
Smarty Rookie


Joined: 05 Feb 2013
Posts: 8

PostPosted: Tue Feb 05, 2013 2:34 pm    Post subject: Reply with quote

mohrt wrote:
Put in the <head></head> of your document:

Code:
<meta http-equiv="refresh" content="20">


i don't want to refresh all page i want to refresh this part using js

Code:
 {include file="companies-list.tpl"}
Back to top
View user's profile Send private message
andreycosmin
Smarty Rookie


Joined: 05 Feb 2013
Posts: 8

PostPosted: Wed Feb 06, 2013 12:22 am    Post subject: No one helped me Reply with quote

No one helped me Sad
Back to top
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 539

PostPosted: Wed Feb 06, 2013 12:51 am    Post subject: Re: No one helped me Reply with quote

andreycosmin wrote:
No one helped me Sad


That's more of an ajax, jquery question, not a smarty one.
Back to top
View user's profile Send private message
andreycosmin
Smarty Rookie


Joined: 05 Feb 2013
Posts: 8

PostPosted: Wed Feb 06, 2013 7:57 am    Post subject: Re: No one helped me Reply with quote

douglassdavis wrote:
andreycosmin wrote:
No one helped me Sad


That's more of an ajax, jquery question, not a smarty one.


yes but code is inderted in smarty template
Back to top
View user's profile Send private message
andreycosmin
Smarty Rookie


Joined: 05 Feb 2013
Posts: 8

PostPosted: Wed Feb 06, 2013 9:09 am    Post subject: Who can help me :( Reply with quote

Who can help me Sad
Back to top
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 539

PostPosted: Wed Feb 06, 2013 11:49 am    Post subject: Re: No one helped me Reply with quote

andreycosmin wrote:
douglassdavis wrote:
andreycosmin wrote:
No one helped me Sad


That's more of an ajax, jquery question, not a smarty one.


yes but code is inderted in smarty template


All client side code can be inserted in a smarty template, including HTML, CSS and javascript. Doesn't mean that those things are smarty.

I would say go to a jquery forum, figure out how to do it in general, then take that jquery code and put it in the smarty template.

http://forum.jquery.com/

http://sixrevisions.com/javascript/the-power-of-jquery-with-ajax/

http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development 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