0

I am using jQuery Ajax Load module in my site to load some contents from url to show on specific div which has a required class. With this module I am able to fetch the Page content from URL through ajax & displays on specific block. I need to replace the blocks when click on the link. for-example I have a block A displayed on content area, also I have block B & C which are hidden for now. when I click on link B the block A should be replaced with block B & so on using AJAX. Please help me? Thanks

0

What have you already tried?
Having a look at the module JS, there is a function jquery_ajax_load_load(el, target, url). Have you tried calling it?

EDIT
To load block content you could either use another module specifically for it (search "drupal block ajax load") (ajax blocks) or you could create your own module that just returns block content when navigating to a url. This should be quite easy by implementing hook_menu and returning the value returned by block_load()

| improve this answer | |
  • Its calling by itself when i activate the module, it will display the loading icon & contents fetching from URL, but my question is how i display block, as there is no URL available for blocks in drupal 7? – Revolution Jan 21 '15 at 9:36
  • I will update my answer – 2pha Jan 21 '15 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.