Simple Jquery Function
April 1st, 2009
I need a jQuery code snippet that will detect when the user copies text/image on the page to clipboard and send this information together with current URL and HTTP_REFERRER via Ajax to the specified URL.
1. If Text is copied call target_url?what=text&refer=HTTP_REFERRER&url=[current page url]&content=[copied text]
2. If Image is coped call target_url?what=image&refer=HTTP_REFERRER&url=[current page url]&content=[image title tag]&alt=[image alt tag]&image_url=[image url]
I’d also like the option to call the target URL without Ajax (since ajax will work only on the same server). For example by dynamically creating an invisible iframe.

Categories: Javascript, Programming Ajax, amp, amp amp, amp refer http, current, function, function programming javascript, http referrer, Image, jQuery, jquery function, jquery function programming, page, refer http referrer, referrer, Simple, simple jquery, simple jquery function, target, target url, text, URL, url current page


