HTML and CSS Reference
In-Depth Information
newSpan.setAttribute('class','name');
newSpan.textContent row.note.substring(0,10) + '...';
newLi.appendChild(newSpan);
commentSpan document.createElement('span');
commentSpan.setAttribute('class','comment');
commentSpan.textContent row.date;
newLi.appendChild(commentSpan);
newLi.addEventListener('click',$i.editNote,false);
document.getElementById('existing').appendChild(newLi);
}
},$i.errorStatementCallback);
}/*errorCallback,successCallback*/);
};
$i.errorCallback function(error)
{
alert('errorCallBack: ' + error.code + ' / message: ' +
error.message);
};
$i.errorStatementCallback function(transaction, error)
{
alert('errorCallBack: ' + error.code + ' / message: ' +
error.message);
return true; //true roll back transaction, false execution
continues
//transaction kann zum error loggign verwendet werden.
;
$i.prepareDatabase function()
{
//migrationusing:
*
var db openDatabase(shortName, "", displayName, maxSize);
var version db.version; // For example, "1.0"
/
//ortry/catch
try
{
var db openDatabase('notes', '1.0', 'Offline Notes
Storage', 5*1024*1024);
db.transaction(function(t){
t.executeSql('CREATE TABLE IF NOT EXISTS notes (id INTEGER
NOT NULL PRIMARY KEY AUTOINCREMENT, note TEXT, date DATE NOT NULL DEFAULT
CURRENT TIMESTAMP);');
},$i.errorStatementCallback);
Search WWH ::




Custom Search