[jQuery] BlockUI "dialog" unblocking from iFrame

[jQuery] BlockUI "dialog" unblocking from iFrame


Hi. I downloaded the BlockUI plugin today. I'm having this problem
with unblocking from iFrame.
I'm making a register page using jquery and ajax, and inform the user
if the data given is valid without reloading the page.
ok so everything's right, except that after i've blocked the screen
after the form is submitted, i cannot unblock it manually (with a
button). it works well with the setTimeout -function, but i don't want
to try to read 5 lines of text in 2-3 seconds. Nor do i want to make
the user to wait 10 seconds before the thing unblocks itself.
this is what i'm having:
var okstyle = '<div style="margin-top: 170px;">Success!

A
Confirmation E-mail has been sent to your E-mail Address.
Please
check both your inbox and junkmail
<button type="button"
class="okback" id="okback" onClick="parent.location="index.php""
tabindex=13><img src="./include/images/submit-yes.png" alt=""/>
Proceed</button></div>';
var errorstyle = '<button type="button" class="errorback"
id="errorback" tabindex=13><img src="./include/images/submit-no.png"
alt=""/> Back</button>';
            $("#submit").click(function() {
                parent.$.blockUI({ message: '<h1>Just a moment...</h1>' });
                $.post("./registerck.php", {
                    email: $("#email").val(),
                    pass: $("#pass").val(),
                    cpass: $("#cpass").val(),
                    question: $(question).val(),
                    answer: $("#answer").val(),
                    bdate: $("#date").val(),
                    bmonth: $("#month").val(),
                    byear: $("#year").val() }, function(data) {
                            if(data == "Success!") {
                                parent.$.blockUI({ message: '<h3>'+okstyle+'</h3>' });
                                $("#okback").click(function() {
                                    parent.$.unblockUI();
                                });
                            }
                            else {
                                parent.$.blockUI({ message: '<h3>'+data+'</h3>'+errorstyle });
                                $("#errorback").click(function() {
                                    parent.$.unblockUI();
                                });
                                $("#errorback", top.window).click(function() {
                                    parent.$.unblockUI();
                                });
                            }
                    });
            });
and yes there is some php too, but i'm positive it's not causing the
problem.