<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="font-size: 10pt;" face="Arial" color="#366092" size="2">Hi Arnd,<br><br>Thanks for the answer and the tip, I tried it but with GeoExt.form.formPanel didn't work, I will take the protocol out of this formPanel and will try that. Without testing it I think it should be a scope problem, because the .refresh({}); function will be calling the protocol which is outside the listeners function, but will try it.<br><br>Any other suggestions are very welcome, thanks</font><span class="ecx625393500-03022013"></span><font style="font-size:10pt" face="Arial" color="#1F497D" size="2"><br><br>Gery<br>__________________________________________________________________________________________<br>Piensa en el medio ambie<font style="" face="Arial">nte - mantenlo en la pantalla. NO lo imprimas si NO es necesario.</font></font><font style="font-size:10pt" face="Arial" color="#1F497D" size="2"><br></font><font style="font-size:10pt" face="Arial" color="#1F497D" size="2">Think green - keep it on the screen. Do NOT print if it is NOT necessary.</font><font style="font-size:10pt" face="Arial" color="#1F497D" size="2"><br></font><font style="font-size:10pt" face="Arial" color="#1F497D" size="2"><span id="ecxresult_box" class="ecxshort_text" lang="de"><span class="ecxhps">Denken Sie an</span> <span class="ecxhps">die Umwelt</span></span></font><font style="font-size:10pt" face="Arial" color="#1F497D" size="2"><span id="ecxresult_box" lang="de"><span class="ecxhps"></span> <span class="ecxhps">-</span> <span class="ecxhps">bewahren Sie es</span> <span class="ecxhps">auf dem Bildschirm.</span> <span class="ecxhps">Drucken Sie es NICHT</span><span>, wenn</span> <span class="ecxhps">es NICHT notwendig ist</span><span>.</span></span></font><br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: arnd.wippermann@web.de<br>To: gamejihou@hotmail.com<br>CC: openlayers-users@lists.osgeo.org<br>Subject: AW: [OpenLayers-Users] How can I overwrite the url ofOpenLayers.Protocol.HTTP?<br>Date: Sun, 3 Feb 2013 18:23:05 +0100<br><br>


<style><!--
.ExternalClass .ecxhmmessage P
{padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;}
.ExternalClass BODY.ecxhmmessage
{font-family:Calibri;font-size:12pt;}
--></style>



<div dir="ltr" align="left"><span class="ecx625393500-03022013"><font face="Arial" size="2">Hi Gery,</font></span></div>
<div dir="ltr" align="left"><span class="ecx625393500-03022013"><font face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span class="ecx625393500-03022013"><font face="Arial" size="2">this is the way without GeoExt :</font></span></div>
<div dir="ltr" align="left"><span class="ecx625393500-03022013"><pre>myVectorLayer.refresh({url: newUrl});</pre></span></div>
<div><font face="Arial" color="#0000ff" size="2"><a href="http://permalink.gmane.org/gmane.comp.gis.openlayers.user/16902" target="_blank">http://permalink.gmane.org/gmane.comp.gis.openlayers.user/16902</a></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial"><font size="2">A<span class="ecx625393500-03022013">rnd</span></font></font><br> </div>
<div dir="ltr" class="ecxOutlookMessageHeader" lang="de" align="left">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>Von:</b> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <b>Im Auftrag von </b>Gery 
.<br><b>Gesendet:</b> Samstag, 2. Februar 2013 19:06<br><b>An:</b> 
openlayers-users@lists.osgeo.org<br><b>Betreff:</b> [OpenLayers-Users] How can I 
overwrite the url ofOpenLayers.Protocol.HTTP?<br></font><br></div>
<div></div>
<div dir="ltr"><font style="font-size:10pt" face="Arial" color="#366092" size="2">Hi 
all,<br><br>How can I overwrite the url of OpenLayers.Protocol.HTTP? I tried 
<br><br>> searchformPanel.protocol.url<br><br>and it works (checked with 
console.log), but at the end the original url is sent (in the code below: url: 
'/fs/') (see attached picture).<br><br>![output from firebug][1]<br><br>This is 
the code: <br><br>    var searchformPanel = new 
GeoExt.form.FormPanel({<br>      border: 
false,<br>      width: 
250,<br>      protocol: new 
OpenLayers.Protocol.HTTP({<br>        url: 
'/fs/',<br>        format: new 
OpenLayers.Format.GeoJSON()<br>      
}),<br>      
items:[{<br>        xtype: 
'combo',<br>        id: 
'idcombo',<br>        store: new 
Ext.data.SimpleStore({<br>          
fields:['fsclass','ollayer'],<br>          
data:[["Boreholes","Boreholes"],["All_layers","All 
layers"]]<br>        
}),<br>        displayField: 
'ollayer',<br>        valueField: 
'fsclass',<br>        fieldLabel: 
'Layer',<br>        emptyText: 'select a 
layer',<br>        submitValue: 
false,<br>        selectOnFocus: 
true,<br>        mode: 
'local',<br>        typeAhead: 
true,<br>        editable: 
false,<br>        forceSelection: 
true,<br>        triggerAction: 
'all'<br>      
},{<br>        xtype: 
'textfield',<br>        id: 
'idtextfield',<br>        fieldLabel: 'Find 
features',<br>        emptyText: 'enter 
word',<br>        name: 
'comments__like',<br>        allowBlank: 
false<br>      }],<br>      
listeners:{<br>        actioncomplete: 
function(form, 
action){<br>          
searchShowTip(action.response.features);<br>        
}<br>      },<br>      
buttons:[{<br>        text: 
'search',<br>        
listeners:{<br>          click: 
function(){<br><br>            
var comboLayer = 
Ext.getCmp('idcombo').getRawValue();<br>            
var keyword = 
Ext.getCmp('idtextfield').getRawValue();<br><br>            
var newUrl = '/fs/' + comboLayer + '?format=GeoJSON&comments__ilike=' + 
keyword + 
'&queryable=comments';<br>            
console.log('1:' + 
newUrl);<br><br>            
//this gets '/fs/' from the 
searchformPanel<br>            
console.log('2:' + 
searchformPanel.protocol.url);<br><br>            
searchformPanel.protocol.url = 
newUrl;<br>            
console.log('3:' + 
searchformPanel.protocol.url);<br><br>            
searchformPanel.search();<br>          
}<br>        
}<br>      }]<br>  });<br><br>Please any support 
about this is very welcome, thank you!<br><br>  [1]: 
http://i.stack.imgur.com/mY1pq.png<br id="ecxFontBreak"></font><br><font style="font-size:10pt" face="Arial" color="#1f497d" size="2"><br>__________________________________________________________________________________________<br>Piensa 
en el medio ambie<font face="Arial">nte - mantenlo en la pantalla. NO lo imprimas 
si NO es necesario.</font></font><font style="font-size:10pt" face="Arial" color="#1f497d" size="2"><br></font><font style="font-size:10pt" face="Arial" color="#1f497d" size="2">Think green - keep it on the screen. Do NOT print if it is NOT 
necessary.</font><font style="font-size:10pt" face="Arial" color="#1f497d" size="2"><br></font><font style="font-size:10pt" face="Arial" color="#1f497d" size="2"><span id="ecxresult_box" class="ecxshort_text" lang="de"><span class="ecxhps">Denken Sie an</span> <span class="ecxhps">die 
Umwelt</span></span></font><font style="font-size:10pt" face="Arial" color="#1f497d" size="2"><span id="ecxresult_box" lang="de"><span class="ecxhps"></span> <span class="ecxhps">-</span> <span class="ecxhps">bewahren Sie es</span> <span class="ecxhps">auf dem Bildschirm.</span> <span class="ecxhps">Drucken Sie es 
NICHT</span><span>, wenn</span> <span class="ecxhps">es NICHT notwendig 
ist</span><span>.</span></span></font><br></div></div>                                    </div></body>
</html>