jquery blockUI and unblocui
Having issue with unblockUI. It gives compile timne error. syntax error $.unblockUI();
<SCRIPT type="text/javascript">
var $ = jQuery.noConflict();
$('#toHide').show().blockUI();
setTimeout('document.getElementById("safeForm15").submit()', 100);
$.unblockUI();
</SCRIPT>
Purpose is blockUI for a period of time show laoding please wait message then unblockit or go to next page.
after removing } im getting another error: ie
$("#toHid开发者_如何学编程e").show().blockUI is not a function
There's a stray "}" after the call to "unblockUI()". If that's really in your code, then that would be a problem.
Also, you really should pass functions to "setTimeout()" and not strings:
setTimeout(function() {
$('#safeForm15').submit();
}, 100);
You're also using jQuery, so you can call "document.getElementById()" if you want but it's clearly less code if you take advantage of the library.
You have an unmatched brace. The last line should be
$.unblockUI();
EDIT
.blockUI()
cannot be called on any object except for the jQuery object. So try:
var $ = jQuery.noConflict();
$.blockUI();
$('#toHide').show();
setTimeout('document.getElementById("safeForm15").submit()', 100);
$.unblockUI();
精彩评论