Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
XML tooltips
I came across this the other day : http://www.codylindley.com/blogstuff/js/jtip/
But I really don’t want to use HTML files for the tooltips, but using XML would be much better, so say for instance you’d create a file called tooltips.xml and then store each tooltip in their and then link to the one you desire.
Anyone able to help with this? I’m guessing it would just be a case of changing the JS to grab the data from the xml file. Thanks.
~ Cameron
Offline
Re: XML tooltips
anyone able to offer help
~ Cameron
Offline
Re: XML tooltips
Depending on how many tooltips you had wouldn’t it be better to store the data in a database and have a php script return the requested data? I’m not sure xml is the best solution here.
Last edited by MattD (2008-10-30 18:56:41)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: XML tooltips
Editing an XML document is far easier than a database table. x
~ Cameron
Offline
Re: XML tooltips
There’s a lot of information on google about jQuery and xml. One example is here which may lead you in the direction of parsing the xml.
Here’s another one
Last edited by MattD (2008-10-30 20:32:22)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: XML tooltips
yeah but i dont get how to change the file ive shown, to get it to NO longer link to individual html files but just ONE XML file
~ Cameron
Offline
Re: XML tooltips
From glancing through the jQuery plugin it looks like the part that needs to change is
$('#JT_copy').load(url);
which is loading the tooltip with the data from the url. Replace the url parameter with the data you want to load after you’ve parsed it from the xml file.
This is my 5 minute observation.
Last edited by MattD (2008-10-30 21:28:22)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: XML tooltips
MattD wrote:
From glancing through the jQuery plugin it looks like the part that needs to change is
$('#JT_copy').load(url);
which is loading the tooltip with the data from the url. Replace the url parameter with the data you want to load after you’ve parsed it from the xml file.This is my 5 minute observation.
Any help with doing this would be much appreciated
~ Cameron
Offline
Pages: 1