1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / jQuery works locally but not in production?

jQuery works locally but not in production?

2 posts, 0 answered
  1. Doug
    Doug avatar
    34 posts
    Registered:
    20 Apr 2010
    07 Jun 2010
    Link to this post
    Hello,
       I have an odd problem: I have developed a user control locally that has two JavaScript dependencies: jQuery and jFlow and the code looks like this:

    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>
      
    <sf:JsFileLink id="JsFileLink2" runat="server" FileName="~/modules/radioshow/scripts/jquery-1.4.2.min.js" ></sf:JsFileLink>
    <sf:JsFileLink id="JsFileLink1" runat="server" FileName="~/modules/radioshow/scripts/jquery.flow.1.2.auto.js" ></sf:JsFileLink>
      
    <script type="text/javascript">
        $(document).ready(function() {
            $("#myController").jFlow({
                slides: "#slides",
                controller: ".jFlowControl", // must be class, use . sign
                slideWrapper: "#jFlowSlide", // must be id, use # sign
                selectedWrapper: "jFlowSelected"// just pure text, no sign
                auto: true,     //auto change slide, default true
                width: "610px",
                height: "235px",
                duration: 400,
                prev: ".jFlowPrev", // must be class, use . sign
                next: ".jFlowNext" // must be class, use . sign
            });
        });
    </script>

    Now when i view this locally I have a slide show control that works properly in sitefinity.  So i pushed all the relevant files up to the prod server but when I try and view the control I am getting javascript errors that would indicate that jQuery and jFlow have not been added to the page correctly.  When I view the source of the page I can see the two javascript references in the head section and I have confirmed that the JavaScript files exist on the prod server.  Am I missing something here?

    Thanks.
  2. Doug
    Doug avatar
    34 posts
    Registered:
    20 Apr 2010
    07 Jun 2010
    Link to this post
    Resolved.  I apprently introduced a typo during the move which I did not notice and, for some reason, did not cause my local install to break.
2 posts, 0 answered