ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

need help for simple javascript validation

hgeorge 15 May, 2007
Hello!
I want to make a very simple form field validation (only one field) with javascript, but it doesnt work. Please help me!

I have put this to the Form tag attachment box:
onsubmit="return checkform(this);"

and the following to the Form JavaScript:
function checkform (formname)
{
  // ** START **
  if (document.formname.fieldname.value == ""ร‚ยซร‚ยป) {
    alert( "Please fill this field!" );
    document.formname.fieldname.focus();
    return false ;
  }
  // ** END **
  return true ;
}
Max_admin 16 May, 2007
Can u show me ur form ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Max_admin 16 May, 2007
i cant see this javascript code in the page source!!!!!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
hgeorge 16 May, 2007
Sorry, please check it again, here.

The name of the form is IV._C.A.C._ADA_PRIJAVA.
The field that I want to validate is called rasa, this is the first text input field on the top.
Thank you very much for your help!
Max_admin 21 May, 2007
Hi,

Yes, It wont work because the form name is : ChronoContact_IV._C.A.C._ADA_PRIJAVA

and not IV._C.A.C._ADA_PRIJAVA , sorry but this happens automatically


I suggest using getElementById too!

Cheers

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
hgeorge 23 May, 2007
Thank you very much for your help. Following your suggestions and removing all dots from formname finally it works!
Max_admin 23 May, 2007
Great!๐Ÿ™‚ If you have any moment to rate my extension at the extensions.joomla.org then this will be a great favor, because other competitors had given me bad ratings to go to the top๐Ÿ˜Ÿ

Thanks!

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
hgeorge 23 May, 2007
Now chronoforms is on the first place!;)
Max_admin 23 May, 2007
Thank you!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com