Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Main Original Upload
- <script language="JavaScript">
- jQuery(document).ready(function() {
- jQuery('#upload_button').click(function() {
- formfield = jQuery('#upload').attr('name');
- tb_show('', 'media-upload.php?type=image&TB_iframe=true');
- return false;
- });
- window.send_to_editor = function(html) {
- imgurl = jQuery('img',html).attr('src');
- jQuery('#upload').val(imgurl);
- tb_remove();
- }
- });
- </script>
- <input id="upload" type="text" size="36" name="upload" value="<?php echo $gearimage; ?>" />
- <input id="upload_button" type="button" value="Upload Image" />
- // Edit The Upload
- <script language="JavaScript">
- jQuery(document).ready(function() {
- jQuery('#upload_image_button<?php echo $chores->id?>').click(function() {
- formfield = jQuery('#upload_image<?php echo $chores->id?>').attr('name');
- tb_show('', 'media-upload.php?type=image&TB_iframe=true');
- return false;
- });
- window.send_to_editor = function(html) {
- imgurl = jQuery('img',html).attr('src');
- jQuery('#upload_image<?php echo $chores->id?>').val(imgurl);
- tb_remove();
- }
- });
- </script>
- <input id="upload_image<?php echo $chores->id?>" type="text" size="36" name="upload_image" value="<?php echo $chores->image;?>" />
- <input id="upload_image_button<?php echo $chores->id?>" type="button" value="Upload Image" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement