Calling multiple XML files depending on what the user clicks on
I would like to set up a keyboard style buttons so when a user click on ‘A’ for instance the output from an XML file is displayed in another DIV on the page.
I have achieved the calling of an XML file using JS and displaying the data in another DIV for one letter however I am struggling to work out how to get it to call different XML files based on the letter selected.
I am new to JS and have not yet sat down to learn the fundamentals so I apologise in advance for any acts of a newbie poster. In my head this should be fairly simple and if I were learn JS properly rather than grabbing snippets it would make sense. From what I have read I would need to write an array but am at a loss as how to go about this.
From a *.js file
clicks on 'A' > xml/knowledge_base_a.xml
clicks on 'B' > xml/knowledge_base_b.xml
clicks on 'C' > xml/knowledge_base_c.xml
As mentioned it currently works for _a.xml but I am unsure how to vary it based on the user click vs the XML file required.
Thank in advance
Hopefully I can give some love back in the CSS/HTML forum.
Code goes in <body>
Thanks for the reply - I will work though and report back. Thanks again
|All times are GMT +1. The time now is 10:54 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.