Forums

Adding Javascript

westendweb 02 Feb, 2011
I've added some javascript to my Chronoforms form, and, alas, although it works fine in a regular web page, it's not working in Chronoforms. I added the script in the "add javascript here" section of the form code. I did not use <script> tags. What am I doing wrong?

Here's the page in Joomla:
http://rupununilearners.dreamhosters.com/visit/book-your-stay.html

And here's the page as a web page:
http://www.rupununilearners.org/booking_calculator.htm

And here's the script:
http://www.rupununilearners.org/scripts/calcprice.js

Be gentle, I'm a web designer with only a rudimentary knowledge of programming.
GreyHead 03 Feb, 2011
Hi westendweb,

The problem is that in the ChronoForms version the id and name of the form are 'ChronoContact_BookingRequest', while your test page and the script are using 'regform'.

Bob
westendweb 03 Feb, 2011
Ta-da!

Thanks, Bob. You're the best.

I can spot missing quote marks and semicolons in HTML and CSS a mile away, and yet miss something this big in javascript with my good glasses on.

M
E
GreyHead 03 Feb, 2011
Hi westendweb,

It's always easier with someone else's code :-)

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