We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30277
    • 75 Posts
    Hi

    I am trying to use lightbox 2.0.2(http://www.huddletogether.com/projects/lightbox2/) in some part of my website but no luck

    what i did:
    - i made the chances on depended files as read me file say
    - added to my template;
    <script type="text/javascript" src="assets/js/prototype.js"></script>
    <script type="text/javascript" src="assets/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="assets/js/lightbox.js"></script>
    <link type="text/css" rel="stylesheet" href="/assets/templates/mytemplatename/lightbox.css" />


    - called image in my page as
    <a href="assets/images/site/test.png" rel="lightbox">test image</a>

    All i have is getting the image in new window

    Since i am new i dont have any idea what i am missing or doing wrong sad

    Thanks for help
      • 7923
      • 4,213 Posts
      are the paths to the js files correct? if you use furl paths, they are not.. try:

      <script type="text/javascript" src="[(base_url)]assets/js/prototype.js"></script>
      <script type="text/javascript" src="[(base_url)]assets/js/scriptaculous.js?load=effects"></script>
      <script type="text/javascript" src="[(base_url)]assets/js/lightbox.js"></script>
      <link type="text/css" rel="stylesheet" href="[(base_url)]assets/templates/mytemplatename/lightbox.css" />

      or use <base href="[(site_url)]"></base> in the head of your template. And also make sure that the js and css files are in those places.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 30277
        • 75 Posts
        Quote from: doze at Mar 19, 2007, 01:42 PM

        are the paths to the js files correct? if you use furl paths, they are not.. try:

        <script type="text/javascript" src="[(base_url)]assets/js/prototype.js"></script>
        <script type="text/javascript" src="[(base_url)]assets/js/scriptaculous.js?load=effects"></script>
        <script type="text/javascript" src="[(base_url)]assets/js/lightbox.js"></script>
        <link type="text/css" rel="stylesheet" href="[(base_url)]assets/templates/mytemplatename/lightbox.css" />

        or use <base href="[(site_url)]"></base> in the head of your template. And also make sure that the js and css files are in those places.

        Hi doze thank you for answer
        yes i do use furl
        Paths are ok
        i added [(base_url)] before assets
        i also have <base href="[(site_url)]"></base> in my template head
        but it still dont works , i probably do something wrong anywhere sad
          • 7923
          • 4,213 Posts
          Unless you give link to the site, this is all that I have to offer.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 30277
            • 75 Posts
            Just realized that it works with darn IE6 but not with ff 2.0.0.2

            check your pm pls doze
              • 7923
              • 4,213 Posts
              Works just fine here on Firefox/2.0.0.2


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 33372
                • 1,611 Posts
                Probably a browser cache issue on Tom’s end; force-refresh the page in FF and see if that helps.
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 30277
                  • 75 Posts
                  I am lost

                  It works fine for me with my ff when i try demo at http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm but not at my site huh
                  ı tryed it with my other pc now (ff 1.5.1 it works but it closes image window when i click somewhere on the page instead hit close link sad
                    • 30277
                    • 75 Posts
                    Quote from: ZAP at Mar 19, 2007, 04:12 PM

                    Probably a browser cache issue on Tom’s end; force-refresh the page in FF and see if that helps.

                    Thanks for answer zap
                    I have clear cache extension i always use sad
                      • 33372
                      • 1,611 Posts
                      If the problem is appearing in Firefox, check the JavaScript Console for errors. Some script is probably not being loaded completely. If the script doesn’t intercept the rel="lightbox" links then you’ll just see the image in its own page.
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options