Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9286917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:32:25+00:00 2026-06-18T19:32:25+00:00

I have one question about passing strings from one Ext.formPanel textfield to another part

  • 0

I have one question about passing strings from one Ext.formPanel textfield to another part of the code. The thing is that I have two “textfield” in the formPanel and I want the words I enter there as part of the “url” I have in the code. Probably you may ask, why does this guy want that?? this is because the “url” I’m using has a PHP script that generates features stored in a postgis db table as GeoJSON.

This the code:

[CODE]
// define the data source
   var protocol = new OpenLayers.Protocol.HTTP({
   url: "http://localhost/postgis_geojson.php?geotable=boreholes_point_wgs84&geomfield=geom&parameters=" + "column" + ilike '%"string"%',
   format: new OpenLayers.Format.GeoJSON({
        ignoreExtraDims: true,
        'internalProjection': new OpenLayers.Projection("EPSG:900913"),
        'externalProjection': new OpenLayers.Projection("EPSG:4326")
    })
});

formPanel = new GeoExt.form.FormPanel({
    title: "Place Name Search",
    height: 150,
    region: "north",
    protocol: protocol,
    items: [{
        xtype: "textfield",
        id: "column",
        emptyText: "Choose table column",
        fieldLabel: "Choose table column",
        width: 200,
        allowBlank: false
    }, {
        xtype: "textfield",
        id: "string",
        emptyText: "Search inside table",
        fieldLabel: "Enter a word to search",
        width: 200,
        allowBlank: false
    }],
    listeners: {
        actioncomplete: function(form, action) {
            features = action.response.features;
            store.loadData(features);
            vm=map.getLayersByName("Results");
            if(vm.length===0){
                vecLayer = new OpenLayers.Layer.Vector("Results");
                map.addLayer(vecLayer);
                store.bind(vecLayer);
                select.bind(vecLayer);
            }
        }
    },
 buttons: [{text: 'search',
        handler: function(){
            formPanel.search();
        }
    }],
    keys: [{ key: [Ext.EventObject.ENTER],
        handler: function() {
            formPanel.search();
        }
    }]
});
[/CODE]

These are the cases I already tested:

  1. url: http://localhost/postgis_geojson.php?geotable=boreholes_point_wgs84&geomfield=geom: this generates the whole table “boreholes_point_wgs84” as GeoJSON.
  2. url: http://localhost/postgis_geojson.php?geotable=boreholes_point_wgs84&geomfield=geom&parameters=station ilike '%llena%': this generates only one feature, the feature that has “llena” in the “station” column. So, in this way I can find the feature through the search form.

What I was thinking is if I can pass these two strings I enter in “textfield” and modify the “url” in the way that it can catch these two words and form, for example, the second case I put above. I was playing with this:

url: http://localhost/postgis_geojson.php?geotable=boreholes_point_wgs84&geomfield=geom&parameters=" + "column" + ilike '%"string"%', so using the “id” I specified below each xtype, but it doesn’t work.

I appreciate any support on this, thanks in advance,

Best regards,

Gery

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:32:26+00:00Added an answer on June 18, 2026 at 7:32 pm

    I’m pretty sure that this solution will help to understand how to solve this problem, I solved myself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about passing data between the pages from one JQM /
I have another one question about functions reference. For example, I have such definition:
i have one question about jquery ajax().. I created a table grid and there
I have one question about searching and counting files in directories and subdirectories. I
I have one question about Yii framework, and I need your help. Basicly, I
Ok, i have one totaly noob question about php sessions: I have 3 (and
I have a question about Criteria method, one-to-many relation to the database, 'one' is
I am following up from this question here The problem I have is that
I have a question about the map function in Python. From what I understand,
i have one question. I ready many pages about best thereading like this http://www.albahari.com/threading/part4.aspx

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.