最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

To invoke thickbox using javascript - Stack Overflow

programmeradmin1浏览0评论

How to invoke a thickbox using javascript function. I am using this code.

//javascript function
function click_fn()
{
 self.location="upload.php?keepThis=true&TB_iframe=1&width=1000&height=400&model=true";
}

How to invoke a thickbox using javascript function. I am using this code.

//javascript function
function click_fn()
{
 self.location="upload.php?keepThis=true&TB_iframe=1&width=1000&height=400&model=true";
}

Share Improve this question asked Dec 1, 2010 at 4:00 Mohan RamMohan Ram 8,46325 gold badges85 silver badges131 bronze badges 0
Add a comment  | 

2 Answers 2

Reset to default 19

Calling Thickbox via JavaScript


var url = "http://www.blah.com/something?KeepThis=true&TB_iframe=true&width=300&height=200";
tb_show("My Caption", url);

Syntax: tb_show(caption, url, imageGroup)

Code allows to call thickbox from javascript.

You can trigger tb_show with inline html as well:

tb_show("Modal title", "#TB_inline?inlineId=modal_container");

When using text be ensure to keep them in p tags. Checkbox label text have to be valid HTML (with label for) otherwise the label gets striped out.

<div id="modal_container" style="display:none;">
    <p>
        Example Text
    </p>     
    <input type="checkbox" name="checkbox_name" id="checkbox_name" value="value">
    <label for="checkbox_name">Example Label</label>
</div>
发布评论

评论列表(0)

  1. 暂无评论