07-07-2008, 03:59 AM
[eluser]EthanSP[/eluser]
I have a form in CI and I want to insert some Javascript for the form's validation. How do I do it? I tried the code below, but I don't know where does CI go when it encounters the said script:
Where should I put my checkform() function codes... in the view, model, or control file? How exactly CI acts from this point onwards? I tried searching the forum but to no avail.
I hope someone will be of help unlike on my last post where no one replied anymore. I believe that this forum is still alive.
Thank you.
I have a form in CI and I want to insert some Javascript for the form's validation. How do I do it? I tried the code below, but I don't know where does CI go when it encounters the said script:
Code:
<? $attributes = array('onSubmit'=>'return checkform()');
echo form_open('welcome/login',$attributes); ?>
Where should I put my checkform() function codes... in the view, model, or control file? How exactly CI acts from this point onwards? I tried searching the forum but to no avail.
I hope someone will be of help unlike on my last post where no one replied anymore. I believe that this forum is still alive.
Thank you.