tags:

views:

405

answers:

1

i'm new to drupal and using drupal6.. i have a module which fetches a set of employee details from database based on input fields.The submit button calls a JavaScript function in an emp.js file which generates an ajax call

 xmlHttpReq.open('GET', "/empfinder.json&dept=" + dept + "&gender=" + gen+ "&age=" + age, true);

while i'm trying to use pager it directly make call as below and displays in a new page.

http://156.23.12.14/empfinder.json?page=1&dept=ACC&gender=Male&age=34

i need to display the results in same page. How should modify pager call to do this?

+3  A: 

You should make your life easier by using the jquery utility functions when doing AJAX requests instead of doing them 'by yourself'. The jquery library is included in Drupal core (at least for Drupal 6). As for documentation, you could start with this post on Ajax in Drupal using jQuery.

Henrik Opel