Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-15-2012, 12:22 AM   PM User | #1
vorl
Regular Coder

 
Join Date: Feb 2005
Posts: 190
Thanks: 25
Thanked 0 Times in 0 Posts
vorl is an unknown quantity at this point
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.
vorl is offline   Reply With Quote
Old 10-15-2012, 01:14 AM   PM User | #2
vorl
Regular Coder

 
Join Date: Feb 2005
Posts: 190
Thanks: 25
Thanked 0 Times in 0 Posts
vorl is an unknown quantity at this point
Sorry I figured it out.

Forgot to change it to return true;

Please close, thanks!
vorl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:07 AM.


Advertisement
Log in to turn off these ads.