![]() |
help on this anyone? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: help on this anyone? (/showthread.php?tid=3866) Pages:
1
2
|
help on this anyone? - El Forum - 10-26-2007 [eluser]mistress_shiira[/eluser] Quote:<div style="font: 12px normal Verdana;color:red;"> hey guys can you help me with this? i have a simple sign up form..when the user submits the form and there is still a validation error, i want the submit button to be enabled.the submit button was disabled on load fyi. the code above doesnt seem to work... help on this anyone? - El Forum - 10-26-2007 [eluser]xwero[/eluser] Have you tried Code: if($this->validation->error_string != '') help on this anyone? - El Forum - 10-26-2007 [eluser]mistress_shiira[/eluser] [quote author="xwero" date="1193407333"]Have you tried Code: if($this->validation->error_string != '') the code ive posted already checks for validation errors and echoes the validation error. what i wanted is that when there is a validation error,the submit button should be enabled. help on this anyone? - El Forum - 10-26-2007 [eluser]ballen[/eluser] You could try something like Code: <div style="font: 12px normal Verdana;color:red;"> and on your button Code: disabled = <?php echo $disabled; ?> help on this anyone? - El Forum - 10-26-2007 [eluser]xwero[/eluser] how do you disable it? I believe you used xajax but i'm not familiar with it. I'm a jquery user and the way i do something like this is to change the class. Code: // view I hope this can help you help on this anyone? - El Forum - 10-26-2007 [eluser]mistress_shiira[/eluser] Quote:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">im already posting the view file for this... help on this anyone? - El Forum - 10-26-2007 [eluser]xwero[/eluser] Seeing this code the function is not going to to be triggered because there is no trigger for it (oncomplete, onload). You could try Code: echo "<script>enable_button();</script>"; You should check the xajax documentation to see if you can attach the enable_button function to the oncomplete event that is how it works in jquery. help on this anyone? - El Forum - 10-26-2007 [eluser]mistress_shiira[/eluser] [quote author="xwero" date="1193417083"]Seeing this code the function is not going to to be triggered because there is no trigger for it (oncomplete, onload). You could try Code: echo "<script>enable_button();</script>"; You should check the xajax documentation to see if you can attach the enable_button function to the oncomplete event that is how it works in jquery.[/quote] ive tried that though but it seems its not working..but thanks for the help.ill try to look it up on xajax implementation.thanks a lot xwero. help on this anyone? - El Forum - 10-26-2007 [eluser]xwero[/eluser] I don't know if you would consider this but instead of enable/disable the button why don't you hide/show the button? This can be done using only php. help on this anyone? - El Forum - 10-26-2007 [eluser]Pygon[/eluser] should work with: Code: echo "<script type=\"text/javascript\">enable_button()</script>" |