Kamalnathts
Kamalnathts

Reputation: 19

How to use AJAX in DRUPAL

I want to implement AJAX in DRUPAL 4.7 as I am beginner in Drupal can any one help me in this, it would be great if I get a snippet of Code.

Actually in a page I have list of items is being there using pagination it is being accessed, but everytime when I click on the next button it relaods the page, Since in the same page I have other features like ADS, TAGS so it takes more time each time loading. So I need to list out the only the content.

So do help me in this Issue.

Upvotes: 1

Views: 961

Answers (4)

Mike Crittenden
Mike Crittenden

Reputation: 5917

You really should upgrade to D6 if AT ALL possible. You're like 5 years behind the times and in Drupal years, that's a loooong time.

Upvotes: 1

googletorp
googletorp

Reputation: 33265

It sounds like you have a JavaScript fatal error on your page, which will disable all JavaScript. There should be an return false attached to the click handler for the pagination, but if that fails, the graceful degradetion would be to execute the link, which will simply reload the page.

So I would suggest you get something like Firebug for Firefox or any other JavaScript development tool, and first check if you get fatal errors.

Upvotes: 0

tog22
tog22

Reputation: 526

If you upgrade to Drupal 5, you could use http://drupal.org/project/ajax_views . At any rate, I'd recommend taking a look at the code in that module and see what you can use/what ideas you can get.

Upvotes: 0

unrelativity
unrelativity

Reputation: 3720

You could perhaps try and use a search engine.

The first result is from Drupal's documentation itself.

So now that you've mentioned what's wrong (i.e. pagination), the possibility of getting help increases.

So you're saying your pagination links reload the whole page. What is the href attribute set to?

Upvotes: 0

Related Questions