Copy clipboard image into webpage using Jquery - php

I want to implement copy clipboard image into webpage.
Ex. User click the printscreen button, opens a web page, clicks CTRL+V and the image is upload to the web page. Can it possible using jquery/javascript or PHP.
Is it possible in firefox?
Thanks in advance.

I'm afraid not, no. You'll have to have your users save the screenshot to disk and then either (a) select it from the disk using a <input type="file" /> element or (b) implement the HTML5 Drag n' Drop API, allowing the user to drag the file into the browser window.

Related

jquery preview modified image in dialog

I have a form with 2 file input which the user will select images to upload.
On submit when the images are uploaded, I first resize the image and merge it with another image using gd and this works fine.
What I want to do before the form is submitted, using Ajax on change of the file input, get the image, processes it on the server using gd (but not upload) and show the user the final result in a ui dialog for them to approve or not.
For reasons beyond my control I cannot use html5. I know you can't post files using Ajax and need to use jquery-iframe-transport or jquery-file-upload or some other plug-in like that.
What is recommended and how do I return the final image to display in the dialog, and if the user then click disapprove, how do I clear the file input field?
Thanks
Take a look at this: http://www.9lessons.info/2011/08/ajax-image-upload-without-refreshing.html
The above tutorial will show you how to do image upload using JQuery.
You can easily change the php file that handles the upload, show the image to the user, if they clicked disapprove, then simply remove the file from the server and start over.

Create Image/pdf/screenshot of webpage on click of a button

I have looked a for a way of allowing a user to click a button that will allow them to save an image or pdf of the current page. The page always chnages and relys on user input, based on this , sequences are returned , colored in different ways. So any way that will allow the user to take a screenshot and download it or save page as image , via a button or link. Can anyone help??
That's not a just like "add the button", you'll need many lines of code on the server-side if you'll decide to do it on your own.
If you really want to add the button only, I'd suggest to use AddThis for this task, it offers hundreds of possibilites, also online PDF generating, sharing by e-mail, support for social network sites, etc etc

Upload Image as soon as user browse their Image from folder

I needed to ask, what is the way when a user selects an image from input type='file' , file start uploaing via ajax, and display the image in a div. User dont need to press a submit button to intiate uploading.
Thanks -
Vivek Mishra
A View Source of one such site reveals
<input type="file" id="fileupload" onchange="uploadfile(this);">
Does that help?
this file will help you to do as you want: http://malsup.github.com/jquery.form.js on the other form you want instant image upload.. the examples you will found on http://jquery.malsup.com/form/#ajaxForm
You need a flash/silverlight/java based uploader which does it. There are several:
SWFUpload, Plupload, etc. They have pretty good documentation, with examples.
the basic method for an "ajax" upload, without using flash / silverlight is using a hidden iframe. just set the form's target to the name of the iframe.

Select multiple Image and upload atonce using PHP

I am using PHP5 and I want to create multiple file uploader of type Image, in such a way that user could select different images while holding Ctrl button and click mouse left button (While user doing so all images will push in an array) and when ever he click to Uplaod button then all images would be upload.
This can't be done using a normal upload dialogue: It supports only one file at a time (this changes in HTML 5, but it isn't there yet). Take a look at Flash based uploaders like SWFUpload or Uploadify.
Have a look at:
Upload Multiple Images at Once using PHP

I want to add an image from a local directory to a php page

I have a page on my http://localhost/user/profile.php. I want the users to add a link of their photo from the desktop. I donot want them to upload. and display the same.
The image is not displayed.
What exactly am I doing wrong here?
Thanks
Jean
how are you planning to store the path to the image, in MySQL or other?
You should be able to simply ask the user via a post/get method in a form, the file path using <input type="file" name="user_photo_path" id="user_photo_path" /> and then embed that variable in an image tag as:
<img src="<?=$userPhotoPath;?>" />
This should then display the image locally, but be mindful that if another user goes to this page to see that photo, it won't show as they are not on the same host.

Categories