By mstef on
I am trying to integrate this AJAX script from dhtmlgoodies.com into my drupal site to dynamically load either nodes or other page body content.
Script:
http://www.dhtmlgoodies.com/index.html?whichScript=ajax_dynamicArticles
Demo:
http://www.dhtmlgoodies.com/scripts/ajax-dynamic-articles/ajax-dynamic-a...
The problem with the script right now is that it loads external HTML files according to the section ID that is clicked. I am not sure how to go about having it load a page from drupal, or just the body content for that matter.
Thanks.
Comments
Hi, I am working on AJAX
Hi,
I am working on AJAX page refreshes myself and came accross this post hoping to find a little help. You see, I have actually managed to find a way of refreshing all the main content div by creating this script.js file in my theme folder which looks for all links in the body of the first loaded page by using the "init_links" function and then finding all the links within the refreshed content using the second and third functions consecutivly. Here's the code:
To get this script working with your theme you will have to replace all instances of "#content-inner-bg" with your content wrapper div id and replace all instances of "#content-inner-inner" with the id of the inner content wrapper of you content.
Here is what my page.tpl.php looks like:
This should give you an idea of where my #content-inner-bg and #content-inner-inner divs are and what they contain so that you understand what it is that I'm reloading. However, this script is far from SEO friendly and does not let the submit functions from form buttons work correctly. My problem is basically getting some kind of way of creating an AJAX login box without using the above script and then implementing the login script into the above script while filtering out the login "link" (submit) button from the above script so that it I can have both AJAX refreshes and AJAX form submissions with the necessary page updating according to the form.
If you have found a way to create a full Drupal and AJAX integration would you mind sharing this with me?
Haha yea I've figured it out
Haha yea I've figured it out and way more...
First check out my drupal site to see the ajax/jquery functionality:
http://www.streetread.com
Then you can read through a post I made about the development - it should answer some questions:
http://www.streetread.com/blog/how-streetread-was-developed
Let me know...