function validationField() { db.transaction(getallTableCntend, errorCB); } function getallTableCntend(tx) { tx.executeSql('SELECT * FROM CaseTable', [], queryexcecute, errorCB); } function queryexcecute(tx, result) { var len = result.rows.length; for (var i = 0; i < len; i++) { if(result.rows.item(i).CaseName ==$('.caseName_h').val()){ alert("Folder is already Exit."); isvalid=false; Break; return;; } } }
$(document).on('click', '#AddButton', function() { isvalid = validationField(); if (isvalid) { insertData(); window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, onFileSystemFail); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)