JNEXT is an open source (triple MPL, GPL, LGPL license), small footprint and cross platform framework for extending Web browser Javascript. With JNEXT it is possible to utilize existing Web browsers to host full and self contained applications that do not depend on external Web servers for the application logic (although they are free to make use of them). This is acheived by enabling Javascript controlled access to the full range of native operating system resources (such as TCP/UDP sockets, files, databases, threads etc). An example is worth a thousand words:
<script language="JavaScript" src="sockets.js"></script>
<script language="JavaScript">
function testSocket()
{
var mySock = new AsyncLineSocket();
mySock.onConnected = function() { this.sendLine( "hello" ); }
mySock.onLine = function( strLine ) { alert( strLine ); }
mySock.connect( "127.0.0.1", 64446 ); // connect to remote socket
}
</script>
below is another example to whet your appetite:
<script language="JavaScript" src="SQLite3.js"></script>
<script language="JavaScript">
function displayLargeCities()
{
var myDB = new SQLite3();
myDB.open( "data.db3" );
var strHTML = ""; var nMinPop = 50000;
var strQuery = "select * from cities where population > " + nMinPop;
var objQuery = myDB.query( strQuery );
var arNames = objQuery.getColNames(); // Will hold column names
var arTypes = objQuery.getColTypes(); // Will hold column types
var strHTML = "<table>";
var row;
while ( (row = objQuery.getRow()) != null ) // Get next row contents
{
strHTML += "<tr>";
for ( var i=0; i<row.length; i++ )
{ // populate table row
strHTML += "<td>" + row[ i ] + "</td>";
}
strHTML += "</tr>";
}
strHTML += "</table>";
document.GetElementById( "idDispTable" ).innerHTML = strHTML;
}
</script>
Site:http://www.jnext.org/index.html