Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:26:08+00:00 2026-06-13T00:26:08+00:00

I am using upload media option and Tiny editor in my theme option. Now

  • 0

I am using upload media option and Tiny editor in my theme option. Now when I am using below javascript

jQuery(document).ready(function() {
    jQuery('.st_upload_button').click(function() {
         targetfield = jQuery(this).prev('.upload-url');
         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(targetfield).val(imgurl);
         tb_remove();
    }
});

it is allowing to upload image and insert url from upload button (see image with input and black upload button)

enter image description here

but with above javascript Tiny editor allowing upload but stops to inserting image into the editor.

enter image description here

I cross checked by disabling javascript and than Tiny editor works fine. So I believe something wrong in javascript but can’t understand what is wrong and how to solve.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:26:09+00:00Added an answer on June 13, 2026 at 12:26 am

    There is no problem in the jquery, only some has to be made while registering your scripts here is an sample code

         function st_add_init() 
    
        {
    
       $screen = get_current_screen();
       $file_dir = get_template_directory_uri();
       wp_enqueue_style("stCss", $file_dir."/font/theme-options.css", false, "1.0",    "all"); 
       wp_enqueue_script("stScript", $file_dir."/js/theme-options.js", false, "1.0");                             wp_register_script('my-upload', get_bloginfo( 'stylesheet_directory' ) .'/js/my-script.js', array('jquery','media-upload','thickbox'));    
       if ($screen->id =='appearance_page_st-settings')   
            {
              wp_enqueue_script('thickbox');
              wp_enqueue_script('media-upload');
              wp_enqueue_script('my-upload');
              wp_enqueue_style('thickbox');
    
            }
       }
       add_action('admin_enqueue_scripts', 'st_add_init');
    

    The get_current_screen(); function retrieves the id of your theme option page

    ‘appearance_page_st-settings’ is the id of my option page, yours will be different

    if ($screen->id ==’appearance_page_st-settings’) the id will be matched to identify whether the page is theme option page,if true, the script will be registered, therefore avoiding any conflict with the admin script

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using an upload script that is working great: ini_set('memory_limit', '256M'); function uploadImage($files_name,
I am using Jquery file upload for my django application. I have copied the
I'm using Thickbox with WordPress, after uploading Thickbox sends data back to editor (upload
We are using SWFUpload for one of our forms so people can upload media.
With WordPress, I'm using wp_editor to allow users to use the editor and media
I'm using the Media module to upload a file in Orchard. If I select
I am currently building a web application (a media player) using Javascript, PHP and
I am trying to upload a file in wordpress using the Media > Add
I'm using jquery form plugin http://jquery.malsup.com/form/#getting-started to upload images to django server side. There
I'm using django and jquery for image uploading. First we upload an image using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.