that's an interesting idea. i'll play with that, thanks adam!

i need the ajax handling for the case of someone hitting the save button on the canvas itself (and would like to keep that for ui purposes), but i might be able to wing it using drupal's usual ahah handling.

On 11/18/2010 09:38 AM, Adam Gregory wrote:
Just a thought but why not just write the canvas data to a hidden form field and then process it with the form data? Do you really need to send it via ajax to be processed and then submit the form? I know it creates a Huge post object but you're still dealing with the same thing if you are sending it via ajax just with an extra step.
-----
Adam A. Gregory
Drupal Developer & Consultant
Web: AdamAGregory.com
Twitter: twitter.com/adamgregory
skype: aagregory2
Phone: 910.808.1717
Cell: 919.306.6138


On Tue, Nov 16, 2010 at 1:48 PM, Aaron Winborn <[email protected]> wrote:
I'm creating an HTML5 canvas editor for a filefield widget, which uploads a canvas image, returning an FID to be stored in a textfield. Everything works, except that now I want to delay node submission until the canvas has a chance to save its work (assuming its associated 'Save' button hasn't yet been clicked).

I'm mostly there, thanks to some help from merlinofchaos. Currently, I save the work and return false on the submit/preview click, and trigger('submit') after the ajax call to save the canvas. However, it's not quite working -- the canvas saves properly, storing the new fid in the field, but the form is reloaded, rather than processing.

http://drupalbin.com/16680

Any ideas?

Thanks,
Aaron

--
Aaron Winborn

Advomatic, LLC
http://advomatic.com/

Drupal Multimedia available now!
http://www.packtpub.com/create-multimedia-website-with-drupal/book

My blog:
http://aaronwinborn.com/




-- 
Aaron Winborn

Advomatic, LLC
http://advomatic.com/

Drupal Multimedia available in September!
http://www.packtpub.com/create-multimedia-website-with-drupal/book

My blog:
http://aaronwinborn.com/

Reply via email to