If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to replace protocol in geoext.form.formpanel

Hello all,

I've been scratching my head over this and I'm wondering if this is possible, sorry if this is so simple but I'm new about javascript and their libraries. I want to replace the protocol of the GeoExt.form.FormPanel in the following way:

1. to render the formpanel, I defined a variable "proto" as null outside the formpanel (var proto = null).
2. then "proto" goes inside the formpanel (protocol: proto).
3. in the handler function of the button a new variable "proto" is defined. I want to replace this new variable inside the formpanel.

Since extjs, geoext, openlayers are javascript libraries, I've tried things such as "eval" to make the variable "proto" inside the handler accessible in the formpanel but no luck so far. Here it is a simplified example to show this: