Thickbox name appears twice

I have a link that opens Thickbox ...

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

      

Everything works with this, except when Thickbox is opened, the title is shown twice:

alt text

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

+2


source to share


5 answers


The only thing that makes sense to me is that either something on "page.php" opens another Thickbox, or "page.php" itself contains an additional header.

Since you are not doing anything fancy with the Thickbox class, I doubt this is a bug in the actual script.



To debug this, I'll first remove the "tag = lists-element" from the url query string as I don't think this is a Thickbox option (correct me if I'm wrong). This way you can break it down into basics and check from there.

0


source


thickbox.js

and thickbox.css

included twice on your page. This is why this problem came up. Remove this duplication and your problem will be resolved.



Alternatively, you can include thickbox.js

and thickbox_compressed.js

or thickbox_min.js

.

+2


source


i was getting the same error, i used below code

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

      

on my main page I commented that it started working fine

+1


source


In my JQuery script that was added to the page.

I added:

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

      

Unfortunately, 4 times in if statements. For example:

    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 in development, which seemed like a solution to the problem at the time. Now I went back and removed them, everything still works. Thus, it is obvious that it was unnecessary in the first place.

But here's what caused the problem.

+1


source


On the main page I added thickbox-compressed.js

, and on the normal aspx page I added `thickbox-compress.js.

Due to this duplicate link addition, it shows twice, please remove those duplicate links.

0


source







All Articles