[development] Need some Drupal FAPI/AJAX advice

Daniel F. Kudwien news at unleashedmind.com
Fri Oct 30 16:29:21 UTC 2009


http://drupal.org/project/feedback

________________________________

	From: development-bounces at drupal.org
[mailto:development-bounces at drupal.org] On Behalf Of Josh Miller
	Sent: Friday, October 30, 2009 3:39 PM
	To: development at drupal.org
	Subject: [development] Need some Drupal FAPI/AJAX advice
	
	

	I'm trying to figure out how best to make the following happen, any
pointers/documentation/example modules would be awesome:

	 

	1) Click a button on the webpage

	2) Jquery fires off a request for a unique form that is not a node
or menu or anything else

	3) Somehow drupal understands the url that I use and fires the
appropriate function

	4) mymodule_send_form() will invoke drupal_get_form() (maybe?)

	5) Jquery recieves the rendered form, adds stuff to it via hidden
inputs like x & y, $_Get['q'], $user->id, etc.

	6) user can fill it out

	7) Jquery sends data back to be saved/verified

	8) Jquery recieves a final themed output of content

	9) Repeat as many times as user wants on the same page by clicking
the button mentioned in #1
	
	

	What has me very confused is that I need to send and receive themed
output, but without the entire site. Simply need chunks of final output to
be sent back and forth. After a discussion on #drupal the other night I
determined that AHAH is not exactly designed to do entire forms.
	
	If anyone is interested (I know from a tweet discussion that
bangpound is) I've got a working javascript framework for adding comments to
entire pages. I'm going to call this module "critique" and it's main use
will be turning it on and having clients add comments to pages (like you
would for PDFs or Word Documents). The problem is I can't decide how to
architect the backend as it will have to be very AJAX-y.
	
	

	I think I know more about Drupal 7 (having spent the most time in D7
issue que), but I'd like a working version in Drupal 6 first.

	
	Josh

	 

	 

	_____________________________________

	Josh Miller

	Web / Technology Director

	 

	Haan Marketing + Communications

	http://www.haanmc.com/

	123 N. 8th Street, Lafayette, IN  47902-0350

	 

	T. 765.423.5470

	F. 765-742-2881

	 




More information about the development mailing list