I am new to JQuery and PHP, and I am trying to implement a jquery webcam in a site, I used this tutorial to implement one, http://tutorialzine.com/2011/04/jquery-webcam-photobooth/. I succesfully integrated it and the upload to file system works, My problem is how can I force redirect a page after clicking the upload button?
Any help will be greatly appreciated,
Use window.location = "http://....";
You have to place it in the function that "saves" and places the image in the grid because if you bind the Button just to redirect, it is possible that the image will not be saved
Related
I tried to insert a custom button through the code in the page.php file for each product page in order to connect functionality to this button in the future. In the future, it should look like this: click on the button, call the window for sending by mail a generated pdf file with a photo gallery on this page (if this is even possible). I'm new to wordpress and not closely related to web development, but I have a task in front of me and I'm trying to find a solution. I've tried adding a button through the function.php file by hook woocommerce_after_single_product_summary and i did it. I have only button for every product page. this is my code
add_action('woocommerce_after_single_product_summary',function(){
printf('<button class="send_button">SEND PDF</button>');
}
);
But now after click on this button i need to call window for sending by mail generated pdf file (like pdf attachment with a photo gallery on this page). Please help me to suggest how I can do this without plugin. Thank you very much in advance.
I'm using Codeigniter. I need to upload Avatar image for my site. I need to upload image with Ajax and Jquery. But NO need Submit button. When I click upload->open it's directly goes to upload via ajax/jquery.
Here after only im going to start my code. If you want sample code, use this link.
Note: (looks & functions) It's should same for all browser.
and I don't want any uploader package.
Thanks...
How would I go about taking a picture from a video capture card or webcam? Should I use flash to do this? I want to submit the picture via a php form and upload it to my webserver and place a link to it in my MySQL database. Is there a flash app already built that I can use to perform this?
try this:
http://code.google.com/p/jpegcam/
I have PHP page where users can upload photos (using Ajax & PHP script). Those uploaded photos (thumbs) are shown after upload in DIV below upload field and fancybox plugin (I'm using it for popup window for photos) is working ok then.
Then, after hitting send button I want to clone that DIV at that same page at message board, bellow other messages with or without uploaded photos.
When I try to do that with:
var pht = $("#photos").clone().addClass('p_pht');
and try to display sent photos bellow sent message like this:
$("div#wall").append('<div class=msg>'+ message +'</div><div class=n_pht>'+ pht.html() +'</div>');
Fancybox plugin don't work. Only the link is working but not with popup window as it should be.
What am I doing wrong?
because you've changed the dom the fancybox plugin doesn't know the new elements exist. there are two ways of solving this.
Call the fancybox plugin again when you've finished adding elements
Use jquery live as answered here jquery live & livequery
Hope that helps.
I need to post a form which includes personal details and I need to upload an attachment file also I need to achieve this using AJAX.
How can I upload a file using AJAX , I need to post the personal detail as well as upload a file at the same time using AJAX , how can I do this?
You can't upload files with AJAX because you can't do multi-part encoded requests - that's a limitation of the XMLHttpRequest API.
Workarounds for this typically involve using an IFRAME that is the target of a form that handles the actual file upload as a separate sub-process to the overall form. The response loaded in the IFRAME then communicates back to the DOM in the parent/calling page with information about the uploaded file.
If you add a hidden iframe on the page
<iframe name="iframe1" ... />
And the change the target on your form to post to the iframe
<Form traget="iframe1" ...>...</form>
You can upload and post the data to the page. You can also use javascript (JQuery) to get hook into the events of the iframe.
To get a upload progress meter, use the php uploadprogress module. It works great!
http://pecl.php.net/package/uploadprogress
and
http://bluga.net/projects/uploadProgressMeter/
Here is a link i found that may help:
http://www.finalwebsites.com/forums/topic/php-ajax-upload-example