hi,please if anyone can offer some help it will be great
hope ill be able to explain what im working on
in my tree i have a document "CLIENTS" (../clients.html) which contains sub documents "CLIENTS NAME" who uses a template variable.
each time a "CLIENTS NAME" (sub document)is added in the "CLIENT DOCUMENT" it will show up on my main page (../clients.html) as a button
"CLIENT NAME 1 , 2..ect"
on my site,when i click on any client name (any button) i want to see its content (content of the sub document) on the same page im on
ill have a div id="clients_list" which will show the clients name in a vertical column and under it
i have created a div id=client_content which must show me the content (wich will be images) of the related subdocument
exp
CLIENT ONE
CLIENT TWO
CLIENT THREE
CLIENT FOUR
-------------------------------------------------
IMAGE OF the button clicked on
--------------------------------------------------
so what’s the code that will go read the content of my sub-document and show it to me on the same page?
i think i should create a snippet or a chunk but i have no idea from where to start.
hope i made myself clear
thanks
-
☆ A M B ☆
- 24,524 Posts
If you want the page’s content to change but without reloading the page, you’re talking about javascript. You can either load all of the content, hiding them and using javascript to display the ones clicked on, or you can use AJAX to go to the database to fetch the appropriate data.
ok ill give it a try.
thank you