Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts

    on submit form - show Fancybox loading div

    Hi all

    I need some help please on using Fancybox with forms.

    I have a form which takes a while to load when the submit button is pressed. To show that the form is doing something I wanted fancybox to show a hidden div that shows a loading message.

    This is the code I am using at the moment:

    Code:
    $('#login-form').submit(function(e) {
        $.fancybox({
            href: '#access-policy', 
            modal: true
        });
        return false;
    });
    
    <form action="test.php" method="post" name="input" id="input">
    <input type="submit" name="test3" value="" id="test3"  class="search_button"  />
    </form>
    
    <div style="display:none">
        <div id="access-policy">
            Loading...
        </div>
    </div>
    So at the moment on submit the div shows fine but the form does not submit. Can any body help to resolve this problem?

    Btw the reason I am using fancybox is because I already use it elsewhere on the page.

    Thanks for any help and let me know if im not clear.

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Sorry I figured it out.

    Forgot to change it to return true;

    Please close, thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •