views:

6

answers:

0

So I'm using the jQuery plugin, RSV(real simple validation) because the client would like to use alert boxes as opposed to inline alerts for the form validation. This site is for mobile browsers. The problem I'm running into is that when there's an error, an alert dialogue comes up to tell the user about their offense. When the alert is closed, the offending field is focused. The problem with the android is that the soft keyboard doesn't show up. Here's the code that generates the error handling:

function timsErrorFunction(f, errorInfo)
      {
        for (var i=0; i<errorInfo.length; i++)
        {
        // errorInfo[i][1] contains the error string to display for this failed field, e.g.
        alert(errorInfo[i][1]);
        // errorInfo[i][0] contains the form field node that just failed the validation, e.g.
        errorInfo[i][0].focus();
        errorInfo[i][0].style.color = "red";
        }

        return false; // always return false! Otherwise the form will be submitted
      }