![]() |
[SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - 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: [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) (/showthread.php?tid=10887) |
[SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - El Forum - 08-17-2008 [eluser]fancms[/eluser] I found this really neat little jQuery script that will basically block out an element or a whole page. http://malsup.com/jquery/block/ I'm interested in being able to implement this into my project, so when a user clicks submit the background is greyed out and they are presented with a "Message...please wait", while the form is processed. However, I'm having a lot of trouble figuring out how to do this with CI. Most of my forms are set up with Code: if($this->validation->run() == FALSE) { I can get the background to grey out but the page just comes back with no validation/processing being done. The link I posted shows a page that lets you do ajax calls to process stuff; however I'm completely lost when it comes to using AJAX with CI. If anyone could give me a few pointers I'd be really grateful. ![]() [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - El Forum - 08-18-2008 [eluser]thinkigniter[/eluser] Hi Fancms, Are you getting confused between CI Validation class and an AJAX validation object? There not the same. Have a look at malsup jquery form plugin malsup.com/jquery/form/ for a good ajax form processsor But give up trying to use the JQ/Forms validation option and the CI validation class. As a basic rule AJAX is client/(after page has loaded) side and CI is server (while page is loading) side. If you already got all of this and it seems as I'm treating you like a child, Sorry, it wasn't meant that way. [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - El Forum - 08-18-2008 [eluser]fancms[/eluser] ![]() Most of my forms are set up like this: Code: function formpage() And I actually have successfully used jQuery's and CI form validation side by side, although that isn't what I'm having issues with here. I will check out the form plugin, though; thanks for the tip! [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - El Forum - 08-18-2008 [eluser]xwero[/eluser] Greying out a form can be done like this Code: $('#form').submit(function(){ [SOLVED!!] Grey out background while processing forms? (jQuery + blockUI) - El Forum - 08-18-2008 [eluser]fancms[/eluser] Wow, sometimes the answer is so simple you can't figure it out until it smacks you upside the head (or maybe that's just me...*ahem*) Here's how I got jQuery + blockUI to grey out the page while the form processed: Code: $(document).ready(function() { Thanks for helping push me in the right direction, cjunky and xwero ![]() |