You need to do to things
1. Add a hidden input to your form to store the data in
2. Either in your paste event handler or onsubmit handler put the contents of the canvas into the control
The following sample adds an onsubmit handler to add the image on submit
HTML
This is a very cool idea, but I wonder about the efficacy of an application that doesn't work for the majority of browsers. It might be worth triggering some kind of alternate event to prompt / redirect the client to save the clipboard if a non-Chrome browser encounters the application. I don't know how to do that -- just a thought... https://upload.wikimedia.org/wikipedia/commons/e/e9/Web-browser_usage_on_Wikimedia.png
golgo
ASKER
Dear Julian,
I'm blown away by your codes (including the php script) !!
Thank you so much!
...but going hidden inputs would make it a two-step process (requiring two pages)...
I apologize for being greedy while I'm being helped so much, is there any way that we could send the image and the user texts (via <input> tags) at the same time...?
And Ray, thank you for the stats, too! That's a good point, and thank you again, Julian, for adding the filter too!
Sorry Julian,
I must have misunderstood what you meant.
Wow....
Thank you so much for your quick help.
You have no idea how thankful I am to you after having pulled out my hair over this for a week and almost gave up.
Thank you SO MUCH, Julian!
1. Add a hidden input to your form to store the data in
2. Either in your paste event handler or onsubmit handler put the contents of the canvas into the control
The following sample adds an onsubmit handler to add the image on submit
HTML
Open in new window
JavaScriptOpen in new window
PHPOpen in new window
Working sample here