form helper and javascript? |
[eluser]Bl4cKWid0w[/eluser]
I made a form validator that is at the top of my html between the head tags. I use the form_open() function from the form helper. In my form's submit button, I use onClick="check(); return false;" but the form still submits anyway even if it is empty. Does javascript work with the form helper?
[eluser]Bluemill Media[/eluser]
A suggestion: Try to refrain from using inline event calls whenever possible. Instead, consider using Event Handlers/Listeners. Read: http://onlinetools.org/articles/unobtrus...pter4.html Do you have Firebug installed? Also, when you view source, what does the output of the form opener look like? I may be wrong, but I'd think that as long as your <form> element is being output correctly, CI isn't going to tamper with your code. After all, the form helpers simply print HTML.
[eluser]Bl4cKWid0w[/eluser]
This is my form function: Code: <?php $formatts = array('name' => 'register'); This is what it displays as: Quote:<form action="http://www.unholydesigns.com/gamerstweak/register/newMember" method="post" name="register"> And yes, I do have Firebug installed. |
Welcome Guest, Not a member yet? Register Sign In |