daily pastebin goal
66%
SHARE
TWEET

drfp-script.js

a guest Dec 31st, 2010 263 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function() {
  2.        
  3.         var formfield;
  4.        
  5.         jQuery('.upload_image_button').click(function() {
  6.                 formfield = jQuery(this).attr('name');
  7.                 var postid = jQuery(this).attr('title');
  8.                 //tb_show('', 'media-upload.php?type=image&TB_iframe=true');
  9.                 tb_show('','media-upload.php?post_id='+ postid +'&type=image&tab=library&TB_iframe=true');
  10.                 return false;
  11.         });
  12.        
  13.         window.send_to_editor = function(html) {
  14.                  imgurl = jQuery('img',html).attr('src');
  15.                  jQuery('#' + formfield ).val(imgurl);
  16.                  tb_remove();
  17.         }
  18. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top