|
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 |
Stephanie Smarty Rookie
Joined: 12 Dec 2005 Posts: 7
|
Posted: Tue Jun 07, 2011 11:16 pm Post subject: Using a Smarty template in a jQuery tab |
|
|
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 |
|
Code62 Smarty Rookie
Joined: 21 Jun 2011 Posts: 12 Location: Work@Liège.be
|
Posted: Tue Jun 21, 2011 1:25 pm Post subject: |
|
|
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 |
|
Stephanie Smarty Rookie
Joined: 12 Dec 2005 Posts: 7
|
Posted: Tue Jun 21, 2011 2:42 pm Post subject: |
|
|
Got it fixed; yes, it was a malformed HTML issue. Thanks for replying anyway! |
|
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
|