jquery - ASP.NET MVC - Validation Summary and BlockUI -


so i've been blocking page "loading" message using following code logon page

<input id="submit" type="submit" value="log on" onclick="block();"/> 

if there's error validation though, block message stay there forever. what's best way present block message takes validation account?

if validation being triggered automatically , stopping form posting, move block(); call forms onsubmit attribute:

<form onsubmit="block();"> 

this way, trigger when form submits, rather when user clicks button when form may invalid.


Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -