Archive for May, 2012

Store SQLite database on HTML5

Posted: May 19, 2012 in HTML

Store SQLite database on HTML5

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>SQL Storage</title>
<body>
<br/><br/>
<div align=”center”>
<input type=”hidden” id=”id”/>
First name:<input type=”text” id=”firstName”/><br/>
Last name:<input type=”text” id=”lastName”/><br/>
Phone: <input type=”text” id=”phone”/><br/>
<button onClick=”resetForm()”>Reset Form</button>
<button onClick=”updateRecord()”>Update</button>
<button onClick=”insertRecord()”>Insert</button>
<button onClick=”dropTable()”>Drop Table</button>
<div id=”results”></div>
</div>
</body>
(more…)

To sending params such as index.html?param1=xx&param2=yy, we can use window.location.search.

Example:

var params = window.location.search.slice(1).split(“&”);
for(var p=0; p<params.length; p++) {
var pair = params[p].split("=");
var name = pair[0] ;
var value = pair[1];
// What you want to do with name and value…
if( name == 'param1' ){
//
}else if(name == 'param2'){
//
}
}

Install the Streaming Media Services role. To do this, follow these steps: Visit the following Microsoft Web site: http://www.microsoft.com/downloads/details.aspx?FamilyID=b2cdb043-d611-41c9-91b7-cddf6e5fdf6b Download the Windows6.1-KB963697-x64.msu file. Run the MSU file for the Streaming Media Services role. To do this, type the following command at a command prompt: start /w wusa /quiet Windows6.1-KB963697-x64.msu To install the Streaming Media Services role, type the following string at a command prompt: start /w ocsetup MediaServer To start the Windows Media Services service, type the following string at a command prompt: net start wmserver