I'm happy to introduce one more my project: PHP-reference.
This is the interactive engine for PHP documentation: the client side is implemented with ExtJS/JavaScript, and PHP for server side.
It uses original PHP documentation (processed via regexps and colored with CSS styles) as a data source.
I've tried to create it as usable as possible... any requests, ideas welcome!
Showing posts with label ExtJS. Show all posts
Showing posts with label ExtJS. Show all posts
24 February, 2009
28 February, 2008
Xml elements and attributes in the ExtJS table
Ext JS - JavaScript Library is pretty powerful JavaScript/AJAX framework for building of Rich Internet Applications.
I've used it in my last public web project: Ubuntu index.
ExtJS has set of useful UI controls, internal components and strong AJAX, XML and JSON support.
E.g. you can present this XML file:
as a table via this HTML + JavaScript code:
I've used it in my last public web project: Ubuntu index.
ExtJS has set of useful UI controls, internal components and strong AJAX, XML and JSON support.
E.g. you can present this XML file:
items.xml
<?xml version="1.0"?>
<items>
<item id="alien-arena">
<name>Alien Arena</name>
</item>
<item id="nexuiz">
<name>Nexuiz</name>
</item>
<item id="openarena">
<name>OpenArena</name>
</item>
</items>
as a table via this HTML + JavaScript code:
table.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>ExtJS Table Sample</title>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
var reader = new Ext.data.XmlReader({record: "item"},
[{name: "id", mapping:"@id"}, "name"]);
var store = new Ext.data.Store({url: "items.xml", reader: reader});
var columnModel = new Ext.grid.ColumnModel([
{header: "Id", dataIndex: "id"},
{header: "Name", dataIndex: "name"}]);
var table = new Ext.grid.GridPanel({
store: store,
height: 200,
cm: columnModel,
renderTo: "table"
});
store.load();
});
</script>
<div id="table" style="width:300px; height:200px;"></div>
</body>
</html>
Subscribe to:
Posts (Atom)