views:

72

answers:

1

Hi all, I am using this Plugin in order to block the UI when <input type="submit"> is clicked. However I don't want to block UI immediately but 2 sec later.

following function doesn't work because $('#processingData') cannot be found, although I have defined <h3 id="ProcessingData" style="display:none">Processing Data...</h3> in the html body.

$(function() {
    $('input[type=submit]').click(function() {
        setTimeout(function() {
            $.blockUI({ 
                message: $('#processingData')
            }); 
        }, 2000);
    });
});

any clue? thanks!

A: 

Dunno if this is just a typo in your question, but processingDataand ProcessingData is not the same. Notice the capital P at the beginning.

And shouldn't it be

message: $('#ProcessingData').text()

?

Mathias Nielsen
thank you very much, I was so stupid! That should be 'processingData' not 'ProcessingData' !
rekinyz
yes and no, I mean not exactly, It is the feature of BlockUI. The message can be plain text and text with styles. That means, the input here can be the whole html fragement: <h3 id="ProcessingData" style="display:none">Processing Data...</h3> You're right, I had mixed up the 'P' and 'p'. Thank you once again! ;)
rekinyz