![]() |
Ajax and Jquery - 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: Ajax and Jquery (/showthread.php?tid=33637) |
Ajax and Jquery - El Forum - 09-02-2010 [eluser]Aaron_owen[/eluser] I had this code working yesterday, and some today I have broken it. It was suppose to load an error box when a username is already registered and then clear if a unique username is entered. Now it just loads "That Username is already taken. Please choose another" reguardless if its unique or not . This is my global.js Code: /* Global JavaScript File for working with jQuery library */ Then my controller Code: <?php The model Code: // Check if username exists The html input box Code: <input type="text" class="cleardefault, login_input" name="username" value="<?php echo set_value('username','Username'); ?>" size="50" id="username"> Ajax and Jquery - El Forum - 09-02-2010 [eluser]Aaron_owen[/eluser] if anyone was wondering..... fixed it. The model needs to be like this Code: function username_exists($username){ |