We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12941
    • 87 Posts
    I am about at my wits end, to be quite honest.

    I have used thickbox and jquery on many many websites, but for some reason I cannot get an inline thickbox to work in ModX. I have a test page where everything works as it should outside of ModX, but as soon as I bring in the EXACT SAME CODE into ModX it won’t load anything. I’ve used other jquery items in ModX for another project and they worked just as they ought. Please note that I am not using this in conjunction with any other snippet (such as MaxiGallery) -- just trying to get an eForm to display in it. Although, I have tried removing the eForm and just getting plain text to show up and that doesn’t work either.

    I have already disabled QuickEdit, so that should no longer be an issue. I have checked the source using Firebug to make sure that no other javascript is being added to the page that may cause a conflict.

    I have searched this forum as well as thickbox’s support for ages and have not found anything.

    Here is my development site, the link with thickbox on it is "Email Listing":
    http://crossmanco.com.previewdns.com/southchase-village-shopping-center.html

    Here is the test page outside of ModX:
    http://crossmanco.com.previewdns.com/thickboxtest.html
      • 26931
      • 2,314 Posts
      Hi,

      ...could be the missing <base href="[(site_url)]"></base> in your head section
        • 12941
        • 87 Posts
        Actually, I took that out because it was was messing with using the #TB_inline ... taking it back to the home page http://crossmanco.com.previewdns.com#TB_inline... instead of http://crossmanco.com.previewdns.com/currentpage.html#TB_inline...

        I don’t really see that I need it, it’s just supposed to make linking pages easier. I don’t have it in other ModX sites I’ve done and it has not caused any trouble.
          • 26931
          • 2,314 Posts
          hmm...okay, was just guessing

          btw, for that anchors problem, there’s a handy plugin "Anchors Away" -> http://modxcms.com/forums/index.php?topic=15753.0
            • 12941
            • 87 Posts
            Quote from: sharkbait at Jul 24, 2009, 11:33 AM

            hmm...okay, was just guessing

            btw, for that anchors problem, there’s a handy plugin "Anchors Away" -> http://modxcms.com/forums/index.php?topic=15753.0

            Wow, thanks! Maybe I’ll try that and see if it works.

            <strong>EDIT:</strong> I got the anchors working right, but Thickbox still doesn’t work.
              • 12941
              • 87 Posts
              Is there anyone using inline Thickboxes in ModX successfully that I can look at their code or help me figure out why mine aren’t working? Anyone use something other than Thickbox that will work? I had a css/limited javascript solution that was working fine, but was having a problem centering the div in the layout, which Thickbox does wonderfully.
                • 12941
                • 87 Posts
                OK, I believe I have found the problem. I am going to document it here for the benefit of others.

                You must use jquery.noConflict().

                Here is a specific example using Thickbox, though you can easily apply it to any jquery function calls:

                1. Open up thickbox.js (uncompressed)
                2. Find & Replace all $ with $j
                3. Paste the following code at the beginning of thickbox.js

                /* No Conflict with other Libraries */
                var $j = jQuery.noConflict(); 


                Thank you sharkbelt for helping me fix the anchor problem!
                  • 26931
                  • 2,314 Posts
                  smiley good it works now!

                  since you disabled Quickedit, with what was jQuery clashing?
                    • 26931
                    • 2,314 Posts
                    okay, i see...

                    javascript code WSP
                    http://support.previewdns.com/mt.js

                    may i ask what is it used for?
                      • 12941
                      • 87 Posts
                      It must have something to do with Godaddy’s PreviewDNS thing. I thought maybe that was what was conflicting with it. Sometimes when I go to the previdewdns page, it opens up with a popup alerting to the fact that I am using preview DNS and how to set my nameservers. It’s actually rather annoying, and I wish Godaddy would just use the IP address like every other host.