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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -