2010-08-17 26 views
0

因此,我使用jQuery插件,RSV(真正簡單的驗證),因爲客戶端想要使用警報框,而不是表單驗證的內聯警報。 此網站是爲移動瀏覽器。 我遇到的問題是,當出現錯誤時,會出現一個提醒對話,告訴用戶他們的進攻。當警報關閉時,違規字段將被重點關注。 與Android的問題是軟鍵盤不顯示。 下面是生成錯誤處理代碼:我不熟悉的Web應用程序的AndroidAndroid Softkeyboard沒有顯示當表單域通過JS聚焦

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 
     } 

回答

0

。我沒有看到這個問題的上下文(RSV聲明,規則,不完整的處理程序)。

但是,我認爲你沒有正確使用RSV。 我的意思是,當驗證失敗時,您不應該手動進行專注,這項工作將由RSV自動完成。 。

你應該只返回一個數組,而不是「假」(見本鏈接查看更多細節: rsv validation by Benjamin Keen own function doesn't work properly?

+0

男人,我需要RSV你的幫助。請儘快與我聯繫:我的Skype:tural.teyyuboglu; gmail [email protected] – heron 2011-11-20 05:10:54