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

Using a Smarty template in a jQuery tab

 
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 -> General
View previous topic :: View next topic  
Author Message
Stephanie
Smarty Rookie


Joined: 12 Dec 2005
Posts: 7

PostPosted: Tue Jun 07, 2011 11:16 pm    Post subject: Using a Smarty template in a jQuery tab Reply with quote

I have a list of data records (names, addresses etc.) which I can display very nicely using jQuery Accordion. I display minimal info (first/last name) in the Accordion listing. Popping open an item reveals several jQuery tabs (Basic, Registration, Account, Meals etc.), each of which is supposed to display related information. The tabs use Ajax to display appropriate HTML.

All that works nicely. The catch is that I want to generate the HTML for the tabs from Smarty templates. The template works perfectly when invoked by itself (i.e.bypassing Ajax) but produces an Ajax error and no output when called via the tab.

Is there some Aiax-ism I need to be aware of? Any tips would be appreciated!
Back to top
View user's profile Send private message
Code62
Smarty Rookie


Joined: 21 Jun 2011
Posts: 12
Location: Work@Liège.be

PostPosted: Tue Jun 21, 2011 1:25 pm    Post subject: Reply with quote

Hello,

Can we see the AJAX error ?
Are you sure your html is well formed ? (the browsers are more tolerant than jquery, it could appear normally when directly invoked, but crashe the javascript)
Do you use "home made ajax functions" with your tabs, or the jQueryUI tabs widget ?

[[ Personnaly, in almost exactly the same context than you, i decided to wrap the html output in xml - in a CDATA section - , that jquery receive and parse... works fine for me ]]
Back to top
View user's profile Send private message Visit poster's website
Stephanie
Smarty Rookie


Joined: 12 Dec 2005
Posts: 7

PostPosted: Tue Jun 21, 2011 2:42 pm    Post subject: Reply with quote

Got it fixed; yes, it was a malformed HTML issue. Thanks for replying anyway!
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 -> General 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