[development] ahah, drupal_json, file_uploads....
darrel.opry at gmail.com
Fri Feb 6 02:16:55 UTC 2009
So I've ran into an interesting issue, and wanted to solicit feedback from
people more involved with ahah/ajax development for drupal than I....
http://malsup.com/jquery/form/#code-samples -- see the file uploads tab and
The concrete issue I'm dealing with is the Add another item button for
CCK... For Filefield if you've selected a file to upload and press the 'Add
Another Item' button you get an error. You get this error because
This issue can be solved easily just by having CCK's ahah handler simply
print drupal_to_js instead of using drupal json. This however will not
solve more systemic issues with people adding file uploads to other ajax
There are a couple solutions I can think of...
1) have ahah set the iframe option to true and use iframes, and add the
textarea to drupal_json.
2) check the _SERVER['HTTP_ACCEPT'] and decide which header to set
whether to wrap output in a textarea
3) hack around it on a case by case basis
I was hoping some of the more jquery ahah astute might have better
suggestions for achieveing some kind of consistency.
We should probably add $_GLOBAL['devel_shutdown'] = FALSE to drupal_json
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development