Load JS removing other JS on page

Wrathkear 07 Nov, 2014
Hi Chronoengine!

Thank you for an awesome product. I am really loving it!

So for my issue, I have created a form with some events to show and hide textboxes when a dropdown is changed (defaulting to being hidden, which is relevant next paragraph), and disabling certain textboxes like today's date and the username so the user cant change it. All of that works great, until I try and Load Javascript from the on Load in the Setup section.

In the load js event, I am trying to use the Jquery UI datepicker so I can have just month and year to pick for vehicle registration and inspection. I was following this link http://www.chronoengine.com/faqs/70-cfv5/5227-using-the-jquery-datepicker.html to set it up, and even just putting in $( '#my-textbox' ).datepicker(); will cause all other javascript to stop. All the textboxes that should be hidden are shown and don't hide when the dropdown is changed. The disabled textboxes are no longer disabled. Even the red asterisks that mark inputs as required go away.

If i delete the text but leave a blank Load JS in, everything goes back to normal. It is only when trying to load the js with text in it. Also, I am using Jquery easy and have it set up with 1.11.1 for jquery and 1.10.1 for jqueryUI.

Let me know if you need anymore info!

Thank you!
GreyHead 07 Nov, 2014
Answer
Hi Wrathkear,

First off CFV5 now has it's own date-picker so you may not need the jQuery one at all.

Second, please ignore the example with $ in it - that was written for earlier versions of Joomla!. Joomla! 3 does not load MooTools by default and assigns $ to jQuery - so the MooTools code breaks. The examples in any of the other boxes using jQ should be OK.

Bob
Wrathkear 10 Nov, 2014
Hi GreyHead,

Thanks for the reply!

I figured out over the weekend that the template I was using was breaking the JQuery. It was a JoomlaArt template in case anyone else may have this problem. Changing templates and disabling their T3 framework fixed it.

Thanks!
This topic is locked and no more replies can be posted.