ASP.NET Code behind Javascript Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • m.ahrens

    #1

    ASP.NET Code behind Javascript Problem

    Hi all

    my java script looks like:

    <script language="javas cript">
    function showProgress()
    {
    window.setTimeo ut('sleep()',20 00);
    }
    function sleep()
    {
    normal.style.di splay = "none";
    inProgress.styl e.display = "block";
    }
    </script>

    my code behind looks like:

    btn.Text = resourceManager .GetString("btn Erstellen");
    btn.Attributes. Add("onclick"," showProgress(); ");

    as you can see i connect my jscript to the clickevent of the button...i only
    have one problem...if for example a requiredfieldva lidator shows an error.
    The button is then not executed (the code behind part is not executed)...but
    the jscript code is executed and that is not what i want...

    how can i tell javascript not to execute if an error is on the page?

    has anyone a solution for the problem?

    thanks for your help!
    m.ahrens
Working...