PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Order Load of Java Script

  1. inserch
    Member

    Does any one know how I can force the gravity form js to load above another script? I'm trying to run a form with a jquery scrollbar, when I add conditional logic it causes the scrollbar to stop working. I've tried a number of different ways to change the order of the js but can't get it to move above the other script.

    This is on a test server so I don't have a url right now for an example.

    Posted 6 years ago on Friday March 29, 2013 | Permalink
  2. Sounds like you have a conflict between the scrollbar plugin and Gravity Forms. You can load scripts in a different order if you deregister them and then reregister them with different dependencies (for example, to load Gravity Forms jQuery after your other script, you could make Gravty Forms dependent on your scrollbar script.

    However, it would be better to fix the conflict. If you post a link to the page on your site where the form is embedded, we can take a look and see what errors might exist.

    Posted 6 years ago on Sunday March 31, 2013 | Permalink
  3. inserch
    Member

    Here's some test posts, first with conditional logic, second without:

    http://bit.ly/10uvTOp
    http://bit.ly/XEjI5u

    Posted 6 years ago on Tuesday April 2, 2013 | Permalink
  4. Thank you for those two test pages. I can't see any JavaScript errors on either page, and the order of the scripts looks the same too. I do see some invalid HTML on lines 103 and 104 when viewing the source of the page:

    103: </p></div>
    104: </p></div>
    					</div><!-- .entry-content -->

    Those closing < /p > tags should not be there. Can you try validating the HTML on the page and fixing the errors to see if that has any effect on the scrollbar?

    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Ftesting.chrismordaportfolio.com%2Fform-test%2F

    Posted 6 years ago on Tuesday April 2, 2013 | Permalink
  5. inserch
    Member

    I'm not sure what is creating those extra </p> tags, both pages have that same error though.

    This is what i'm pasting in the editor:

    <div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
    <div class="viewport">
    <div class="overview">
    [gravityform id="1" name="Delivery Notes"]
    </div>
    </div>
    </div>

    This is the original jquery plugin that i'm using: http://baijs.nl/tinyscrollbar/

    Posted 6 years ago on Tuesday April 2, 2013 | Permalink
  6. Can you try formatting all that as one line, rather than line breaks, to see if it gets rid of the extra paragraph tags?

    I did see that the invalid HTML was on both pages. However, only the page with conditional logic would be susceptible to extra markup fouling the JavaScript. Can you please try one line for all that markup and see if the extra paragraph tags go away?

    [html]
    <div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div><div class="viewport"><div class="overview">[gravityform id="1" name="Delivery Notes"]</div></div></div>
    Posted 6 years ago on Tuesday April 2, 2013 | Permalink
  7. inserch
    Member

    Page has been updated and the two errors are not appearing when validating but still same result.

    Posted 6 years ago on Wednesday April 3, 2013 | Permalink
  8. inserch
    Member

    Checking in for a follow up to my last response. thanks.

    Posted 6 years ago on Friday April 5, 2013 | Permalink
  9. inserch
    Member

    Hi, I still need help with this issue.

    Posted 6 years ago on Saturday April 13, 2013 | Permalink