[Solved] Stop dropdown login form from closing if validation error |
I have question about ajax.
Question On my dropdown menu link sign in if there is a error on my ajax login form validation how to stop the bootstrap dropdown menu from closing? I append view using script below. Code: <nav class="navbar navbar-default"> On my login view this is the append html Code: <li>
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
If your using Bootstrap you would need to use the javascript dropdown and check for the validation error and then control the dropdown
SEE: the Bootstrap DropDown js file. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Your sample is too complicated for me to try to replicate and test, but if you have disabled default action on click, the menu should not be closing, and you can inject the error message back into the panel. If it is closing for some reason, which I am not sure why it would, and you cannot find the relevant code to stop it doing it, you would need to reopen it via js with the error message injected.
PHP Code: $('.dropdown').addClass('open');
(10-06-2016, 04:46 AM)InsiteFX Wrote: If your using Bootstrap you would need to use the javascript dropdown and check for the validation error and then control the dropdown I got it working now just tweaking error messages it seem to be this was issue Code: $('#ul-dropdown-login').remove(); PHP Code: <script type="text/javascript"> PHP Code: <script type="text/javascript">
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |