store = new GeoExt.data.FeatureStore({
layer: vecLayer,
fields: [
{name: 'a_code', type:'string'},
{name: 'shooting_time', type: 'string'},
{name: 'total_discarded_weight', type: 'double'}
],
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.HTTP({
method:'GET',
url: "consulta3.php?date1="+ReadCookie('date1')+"&date2="+ReadCookie('date2')+"&especies="+escape(ReadCookie('especies')),
format: new OpenLayers.Format.GeoJSON()
})
})
});
gridPanel = new Ext.grid.GridPanel({
title: "Información de Capturas",
region: "south",
border: true,
collapsible: true,
collapsed:true,
collapseMode: "mini",
store: store,
stateful: true,
width:320,
height:400,
boxMinHeight: 450,
autoScroll: true,
split:true,
columns: [{
header: "COD",
width: 35,
sortable: true,
dataIndex: "a_code"
},{...}],
stripeRows: true,
sm: new GeoExt.grid.FeatureSelectionModel()
});
var xmlhttp;
function xhr(formulario){
if (window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}else{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = procesarRespuesta; //Ojo sin parentesis
xmlhttp.open("POST", "consulta2.php", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Cache-control", "no-cache");
xmlhttp.send(formulario);
}
function procesarRespuesta(){
if(xmlhttp.readyState == 4) {
if(xmlhttp.status == 200) {
store.load();
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
The content of this site is copyrighted by Quizzpot.com, it is prohibited to publish our tutorials on other blogs, magazines or any other media without prior permission.
Copyright © 2012 Quizzpot.
Our visitors are mostly developers and Web designers, advertise with us, you only need to contact us .