All pastes #477479 Raw Edit

Something

public text v1 · immutable
·published 2007-05-08 17:45 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript" src="dojo/dojo.js"></script>
		<script language="javascript">
		
			dojo.require("dojo.event.*");
			dojo.require("dojo.widget.*");
			dojo.require("dojo.widget.Button");
			dojo.require("dojo.widget.ContentPane");
			dojo.require("dojo.json");
			
			dojo.hostenv.writeIncludes();
			
			function list_articles() {
				var params = new Array();
				var req = dojo.io.bind({
					url: 'dados.json',
					mimetype: "text/json",
					load: function(type, data, evt) {
                                                alert("test");
						var w=dojo.widget.byId("articles");
						w.store.setData(data);
					}
				});
			    
			}
			
			dojo.addOnLoad( list_articles );
			
		</script>
	</head>

	<body>
		<table dojoType="FilteringTable" id="articles">
			<thead>
				<tr>
					<th field="status" dataType="String" sort="asc">Status</th>
					<th field="title" dataType="String">Título</th>
					<th field="introtext" dataType="String">Introdução</th>
					<th field="date" dataType="String">Data</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
	</body>
</html>