javascript not showing in of document

cre8tive1 23 May, 2007
Hi all,

I'm trying out Chronoforms and am having trouble getting the Javascript to work.

http://www.halekonakai.com/index.php?option=com_chronocontact&chronoformname=resv&Itemid=35

I have added the code below into the Javascript window for the Chronoforms Manager without <script> tags. However, when I view the source code the script is down within the body of the page not in the <head> where all the other scripting is.

Could this be why it's not working? If not, does anyone else see any errors in the scripting?



var testresults
function checkemail(){
var str=document.validation.email.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Please input a valid email address!"«»)
testresults=false
}
return (testresults)
}


function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}


Thanks,

Jerry
Max_admin 23 May, 2007
Hi Jerry,

you are putting two forms inside each other, please remove the form tags at your code, ONLY the elements and other HTML, if you want to add some parameters to your form tag then you can add them in the "from tag attachement" field!

Thanks

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.