Dear users,

Since extjs, geoext, openlayers are javascript libraries, I've tried things 
such as "eval" to make variables accessible in the code below but 
no luck so far. I want to update or replace a variable (ie. in the protocol) 
that is at first 
null (so null in protocol and also outside formPanel), then defined with 
something (ie. inside the handler function, is it right to define it there?) 
and then 
use it inside a variable (as proto in "protocol: proto", so replace the one is 
already null), here is an example:

var proto = null;                    # <--- replace here (old "proto")

var formPanel = new GeoExt.form.FormPanel({
    protocol: proto,                 # <--- or replace here (old "proto")
    items: [{
        xtype: "combo",
        id: "idcombo",
        etc...
    }, {
        xtype: "textfield",
        id: "idtext",
        etc...
    }],
    button:[{
        text: "search",
        handler: function() {
            formPanel.search();
           var combo = Ext.getCmp('idcombo').getValue();
           var text = Ext.getCmp('idtext').getRawValue();
           var proto: new OpenLayers.Protocol.HTTP({               # <------- 
new "proto" to replace above
                url: "http://www.pub.pub/"; + combo + "/rhen/" + text
        }),
    }
 }]
});is is possible to use this new "proto" to replace the old "proto"? if so, 
how can I do it?, not sure if new "proto" has to go in 
the handler: function. I defined "var proto = null" at first because without it 
the formPanel doesn't render due to "proto is not defined". I'll appreciate 
your support, thanks in advance.

Best regards,

Gery

                                          
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to