Forums

Calendar JS issue?

jonnybearback 16 Feb, 2010
I took ages working out which way to go with forms and how to integrate forms with subscriptions, mailing lists etc etc. I was all set for RS, but decided to try the free Chronoform before making a decision. Anyway, Chrono seems excellent. I digress...

I have a holiday company so the calendar function is important for any forms we have, trouble is it doesn't appear in my form when live.

Searching these forums resulted in finding this from Bob:

If you add &tmpl=component to the URL does the datepicker then work? (If it does then there's probably a Javascript conflict with the theme or another extension).



So, adding that extension does make the calendar date picker appear... so, any suggestions as to what I need to look for in terms of JS conflicts?

Thanks

Jonny

http://www.bearbackriding.com/index.php?option=com_chronocontact&chronoformname=contact_bbb

Finally - any recommendation on a good newsletter/mail out extension (acajoom?)
GreyHead 16 Feb, 2010
Hi Jonny,

Your template is loading the JQuery library which conflicts with the MooTools library that Joomla and ChronoForms use. In theory the answr is to put JQuery.noConflict(); into the form JavaScript box.

I haven't tested so can't confirm that it works though.

I use an external newsletter service and don't have strong views on the Joomla ones. I've done client work with AcaJoom and it seemed friendly enough.

Bob
jonnybearback 16 Feb, 2010
Hi Bob,

thanks for that.
I entered this into the template and its fixed the calendar

<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/bearback/javascript/iepngfix_tilebg.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/bearback/javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/bearback/javascript/bgstretcher.js"></script>



While reading around this issue, it appears that loading multiple scripts can create conflict/more intensive resource use.
I'm not sure what purpose jquery currently has on my site but I wonder if fooling jquery/mootools into allowing both script libraries to run together is going to casue issues down the line?!

p.s. I have no real grasp on js
GreyHead 17 Feb, 2010
Hi jonny,

There's always a choice in what resources you use to support your site. With today's broadband the file-size problems are much less important than they were five or ten years ago. That doesn't mean to say tha tyou ignore them, but unless you have a high traffic site or a ot of dial-up or mobile users you probably don't need to put them at the top of the to-do list.

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