I need some additional guidance/confirmation
I am working on some AHAH interactions on a module I am working on I have 3 AHAH actions that I need help "DRUPALising" I know how to do it with PHP but I am working on trying to get better at using the Drupal API rather then falling back on pure PHP
1st I need to find all of the "Node IDs" and "Titles" and return that in to the AHAH JSON event. to find the nodes I am planing on using something like
$result = db_query('SELECT n.nid, n.title FROM {node} n WHERE n.type = '."'node_type'".' and n.status = 1');
$output = '';
while ($node = db_fetch_object($result)) {
unless there is a better way using the Drupal API
2nd Same as the 1st but I need Users this time so see code above for what I am currently using but again I would prefer using the Drupal API if possable
3rd Opening up a New Node form inside a AJAX build layer then returning the new information to the parent form upon save
I am not really sure where to start on this one inside the Drupal API but I think its going to be off of the drupal_process_form($form_id, $form, $form_state); I can do the JS and CSS for making it look good but I am not sure what APIs I need to call in order to build the form for a different Node then what I am currently in
- Shawn