0

I am having a problem, regarding wp media popup, I am using a thick box for some data insertion. Now from that thick box the media popup is callled. Now from media popup when I click on 'insert into post' button, the media popup get closed and also my thick box.

But the data is placed properly, and when I reopen the thickbox (without page refresh), the thick box contain the data from media popup. But this behaviour is not good.Can any one please suggest me about the remedy.

            <!-- THE LLNK WHICH OPEN THE THICKBOX-->
            <a name="Add new frame" class="thickbox" href="#TB_inline?width=800&amp;inlineId=new-frame-form&amp;width=753&amp;height=319">Add new</a>





            <!-- THE OUT HTML INSIDE THE POPUP-->
            <div class="frame_create_form">
            <div class="admin-modal-back">
                <form action="http://localhost/wp-admin/admin.php?page=pc-frames&amp;noheader=true" class="pc_admin_form" method="post">
                <ul class="details">
                    <li>
                        <div class="text-back"><p>Name:</p></div>
                        <div class="text-box-back"><input type="text" required="required" class="text-box" value="" name="name"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Desc:</p></div>
                        <div class="text-box-back"><div class="wp-core-ui wp-editor-wrap html-active" id="wp-f_title-wrap"><link media="all" type="text/css" href="http://localhost/wp-includes/css/editor.min.css?ver=4.1" id="editor-buttons-css" rel="stylesheet">
<div class="wp-editor-tools hide-if-no-js" id="wp-f_title-editor-tools"><div class="wp-media-buttons" id="wp-f_title-media-buttons"><a title="Add Media" data-editor="f_title" class="button insert-media add_media" id="insert-media-button" href="#"><span class="wp-media-buttons-icon"></span> Add Media</a></div>
<div class="wp-editor-tabs"><button onclick="switchEditors.switchto(this);" class="wp-switch-editor switch-tmce" id="f_title-tmce" type="button">Visual</button>
<button onclick="switchEditors.switchto(this);" class="wp-switch-editor switch-html" id="f_title-html" type="button">Text</button>
</div>
</div>
<div class="wp-editor-container" id="wp-f_title-editor-container"><div id="qt_f_title_toolbar" class="quicktags-toolbar"><input type="button" value="b" class="ed_button button button-small" id="qt_f_title_strong"><input type="button" value="i" class="ed_button button button-small" id="qt_f_title_em"><input type="button" value="link" class="ed_button button button-small" id="qt_f_title_link"><input type="button" value="b-quote" class="ed_button button button-small" id="qt_f_title_block"><input type="button" value="del" class="ed_button button button-small" id="qt_f_title_del"><input type="button" value="ins" class="ed_button button button-small" id="qt_f_title_ins"><input type="button" value="img" class="ed_button button button-small" id="qt_f_title_img"><input type="button" value="ul" class="ed_button button button-small" id="qt_f_title_ul"><input type="button" value="ol" class="ed_button button button-small" id="qt_f_title_ol"><input type="button" value="li" class="ed_button button button-small" id="qt_f_title_li"><input type="button" value="code" class="ed_button button button-small" id="qt_f_title_code"><input type="button" value="more" class="ed_button button button-small" id="qt_f_title_more"><input type="button" value="close tags" title="Close all open tags" class="ed_button button button-small" id="qt_f_title_close"></div><textarea id="f_title" name="description" cols="40" autocomplete="off" rows="3" class="wp-editor-area"></textarea></div>
</div>

</div>
                    </li>
                    <li>
                        <div class="text-back"><p>Width in inch:</p></div>
                        <div class="text-box-back"><input type="number" required="required" min="1" max="100" step="1" value="" class="text-box" name="width_inch"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Height in inch:</p></div>
                        <div class="text-box-back"><input type="number" required="required" min="1" max="100" step="1" value="" class="text-box" name="height_inch"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Width in cm:</p></div>
                        <div class="text-box-back"><input type="number" required="required" min="10" max="1000" step="0.01" value="" class="text-box" name="width_cm"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Height in cm:</p></div>
                        <div class="text-box-back"><input type="number" step="0.01" required="required" value="" name="height_cm" class="text-box"></div>
                    </li>

                     <li>
                        <div class="text-back"><p>Price:</p></div>
                        <div class="text-box-back"><input type="number" step="0.01" required="required" value="" name="price" class="text-box"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Rergular price:</p></div>
                        <div class="text-box-back"><input type="number" step="0.01" required="required" value="" name="regular_price" class="text-box"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Image min width: </p></div>
                        <div class="text-box-back"><input type="number" required="required" value="" name="min_width" class="text-box"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Image min height: </p></div>
                        <div class="text-box-back"><input type="number" required="required" value="" name="min_height" class="text-box"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Active:</p></div>
                        <div class="text-box-back"><input type="checkbox" required="required" class="" value="1" name="is_active"></div>
                    </li>
                    <li>
                        <div class="text-back"><p>Frame category:</p></div>
                        <div class="text-box-back"><select required="required" name="category" class="text-box">
                        <option value="">Select a frame category</option>
                                                <option value="2">Square panel</option>
                                                        <option value="3">Single Panel</option>
                                                        <option value="4">Panoromic</option>

                    </select></div>
                    </li>
                    <li>
                        <p class="submit"><input type="submit" value="Create frame" class="button button-large" id="pc_create_frame" name="pc_create_frame"></p>                    </li>
                </ul>
                </form>
            </div>

        </div>
2
  • Show us the code, please, so we take a look.
    – cybmeta
    Jan 9, 2015 at 9:55
  • @cybmeta I have added the code. Sorry for the late response.Actually I noticed the problem but my client not, but now he is also asking about this. Feb 6, 2015 at 7:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.