PDA

View Full Version : Switch Content Script II (icon based) with AJAX



shyne
09-06-2007, 06:43 AM
1) Script Title:
Switch Content Script II (icon based)

2) Script URL (on DD):
http://dynamicdrive.com/dynamicindex17/switchcontent2.htm

3) Describe problem:

Hi

I want to know if anyone can tell me how can I implement AJAX in to the script above. It perfect for my situation or what I am trying to achieve. I have a few categories which are called in a page and then I want to have this script implemented so when a user clicks on a category it shows the related content from that category. Now using this script it works fine but since I have lot of content inside each category having them all query behind the scenes is a bit heavy so thats why I want to have AJAX somehow implemented in to this script so that it calls a dynamic url file.php?cat=1 when clicked on a category and loads the content in to its specific div container.

Remember Every category have its own div container so when a user clicks on category 1 the contents are loaded in to its very own container called <div id="cat1">category 1 contents go here</div> and then when a user clicks on category 2 it should toggle back category 1 and show content for category 2 in its own container called <div id="cat2"></div>

Pretty much the same script with its feature only thing added the ability to call dynamic pages when clicked instead of a hidden text inside a div already outputted in the page.

Hope I made it clear enough.

Thanks for any help
:)

ddadmin
09-06-2007, 08:59 PM
Hi:
Currently there's no easy way to throw in fetch by Ajax to the Switch Content 1 and 2 scripts. It's a useful idea though, so you can probably expect such a feature down the line. No ETA though.