質問

I have a link that opens a Thickbox...

<a href="page.php?tag=lists-element&keepThis=true&TB_iframe=true&height=450&width=500">

Everything works with this except when the Thickbox opens up the title is displayed twice:

alt text

Any ideas as to why this is happening or how it can be fixed?

役に立ちましたか?

解決

The only thing that makes sense to me is that either something on the "page.php" opens another Thickbox, or that the "page.php" itself contains the extra title.

Since you're not doing anything out of the ordinary with the Thickbox class, I doubt that it is a bug in the actual script.

To debug this, I would first remove the "tag=lists-element" from the query string of the URL, as I don't think that is a Thickbox option (correct me if I'm wrong). That way you can strip it down to the basics and test from there.

他のヒント

thickbox.js and thickbox.css are included twice in your page. That's why this problem occurred. Remove this duplication and your problem will solved.

Alternatively, you may be including thickbox.js and thickbox_compressed.js or thickbox_min.js.

i was getting the same error i was using the below code

if (Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) 
       {
            tb_init("a.thickbox, area.thickbox, input.thickbox");
       }

in my master page i commented it it started working fine

In my JQuery script which was added to the page.

I put in:

tb_init("a.thickbox, area.thickbox, input.thickbox");

sorry to say, 4 times in if statements. Like so:

    if ($(".ToDoList:contains('Times - Incomplete')").length != 1
        & $(this).val().length > 2) {
        $(".ToDoList ul").append('<li><a title="Disposition" class="thickbox1"><span>Times - Incomplete</span></a></li>');
        //tb_init('a.thickbox, area.thickbox, input.thickbox');
        $(".contentRightHand").show();
    }

This was early on in development which at the time seemed like the solution to the problem. Now I went back and removed them, everything still works. So obviously, it was not needed in the first place.

But, that's what was causing the problem I had.

In Master Page I added thickbox-compressed.js and in normal aspx page also I added the `thickbox-compressed.js.

Because of these double addition of references its showing twice so please remove these duplicate references.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top