![]() |
|
![]() | ||
|
Subject:
Cut and Paste Image into "web form"
Category: Computers > Internet Asked by: devanchya-ga List Price: $25.00 |
Posted:
16 Mar 2005 08:08 PST
Expires: 19 Mar 2005 17:33 PST Question ID: 495540 |
I've been asked to create a feature on a website that allows thier users to simply cut and paste an image from the clipboard to the website and then upload the file to the server. They have shown me something on another website but I can not seem to find any record if it's a public program they bought or if it was custom programmed. The need is as follows: The ability of the person to "Copy" an image or text or "screen print" to a section of the page. Finish a form and then submit the form The Image is then able to be saved to a file on the system. Bonus: Able to save to a Unix System Super Bonus: Able to interact via perl |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Cut and Paste Image into "web form"
From: willcodeforfood-ga on 16 Mar 2005 11:38 PST |
I hope someone can prove me wrong, but you will not be able to accomplish pasting an image into a form in a browser using only JavaScript and DHTML. A user can paste text from the clipboard into a number of form controls, but not images. The closest you can get to this with only JavaScript and DHTML is: 1) direct the user save the image or screen-print to a file 2) open a file explorer for the user so the user can select the file 3) display a preview of the image on the webpage before submitting (optional) 4) submit the file to your web application Saving and manipulating the file on your server once the webpage has posted it is possible, but the specifics will depend on what web server platform/language you are using. (PHP, ASP, ASP.Net, Cold Fusion, etc.) I'm guessing from your question you are using Perl on Unix. Is this right? If you want to automate the client-side portions of this process so it is simpler for the user, it will require client-side software. You could implement this as a stand alone application, browser plug-in, or using other methods. You might be able to find a way to get the Flash plugin to do this with some fancy ActionScript, which would be nice since it is probably already on your client workstations. I've done some ActionScript programming and would guess that this will be a dead-end too, but cannot say for sure. Even so, you'd have to write a custom web server application for Flash to transmit the image to. Let me know if you need sample HTML/JavaScript for the steps I outlined above. |
Subject:
Re: Cut and Paste Image into "web form"
From: devanchya-ga on 16 Mar 2005 12:19 PST |
As far as I can tell, it would be a Java or ActiveX plug in. I know they had to install a special control but that is it... |
Subject:
Re: Cut and Paste Image into "web form"
From: willcodeforfood-ga on 16 Mar 2005 12:49 PST |
Okay, so we've established that you're going to need a plugin or client software of some sort. The next question is what runtime software platform will be consistently available on the client workstations. I take it that the client workstations will all be running Windows. If you need this to run on both Navigator and IE, I think you'll have to use a Java applet and harness the JRE. Java is not a specialty of mine, but you could possibly start with some code like this: [ http://www.devx.com/Java/Article/22326/0/page/5 ] If you want to use a Microsoft development tool, then determine if the .Net framework will be on all of the client workstations. If so, then you can use C# or VB.Net to write the plugin. If not, then your choices for development are VB and VC++. If you are confident that users have recent versions of Windows (and will therefore have VB runtime available) you can write the control using VB. If not, then you'll need to write the control with VC++. There will be some additional steps to ready the control for deployment, including signing the code and packaging it into a .cab file. I've made a few plugins for the IE browser using VB and VC++ ATL so I can give you some additional guidance along those lines if you'd like. Your final alternative is to write a completely stand-alone application using any software that the client workstations can support. The drawback is that you'll have to come up with your own deployment solution but the advantage is that you could automate the enitire process, including taking the screen snapshot and posting the image to your server. |
Subject:
Re: Cut and Paste Image into "web form"
From: devanchya-ga on 16 Mar 2005 13:30 PST |
Right now I'm leaning towards ActiveX. All machines run Windows and IE. The site currently is compatible with IE and Netscape, but the netscape compatiblities a personal my goal, not the companies. 99.9% of the site is currently running Redhat Enterprise, with Apache and perl code. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |