1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    40
    Vote Rating
    0
    Gery is on a distinguished road

      0  

    Default replacing in url

    replacing in url


    Hello,

    I'm working with Ext/GeoExt/OpenLayers, so this is like a mixed question, but I'm pretty sure ExtJS has to be very important on this issue. I've been trying to replace correctly an url in OpenLayers.Protocol.HTTP after using a GeoExt.form.FormPanel (ie. combobox and textfield), but seems that the new url is being passed to the url of ExtJS and not to the url of the protocol. I've a live demo for this here:
    [0]. In the case I choose "cars" in the combobox and enter "cool" in textfield, the new url I want will be: http://www.mop.org/fs/cars?format=GeoJSON&comments__ilike=cool&queryable=comments (please see [1]).

    To send this new url to the protocol, I use an autoLoad call in the handler function of the search button, after pressing it the new url is sent but it's not catched by the protocol itself (ie. XMLHttpRequest.js) but for ExtJS. So, the GeoJSON output is displayed in the window of the form panel (please see [2]). Thus, in Firebug two urls (please see [3]) are called, the first one is the new url I want in the url of the protocol, but it goes to ext-base.js, which is the wrong place. The second one, I actually don't know why is sent, goes to XMLHttpRequest.js which is the right place, but it shouldn't be sent.

    I tried taking the protocol out of the form panel and put it as variable, but after pressing the button, I receive 'o.protocol is null' in Firebug.

    how could I do to replace correctly my new url (ie. 'myurl' in the code)? it seems to me that the new url is replacing an inexistent url which belongs to ExtJS,

    I'd appreciate any suggestions about this problem, thanks in advance,

    Best regards,

    [0]:
    http://jsbin.com/ireqed/2/edit
    [1]: http://i.stack.imgur.com/7ow1t.png
    [2]: http://i.stack.imgur.com/yQTOm.png
    [3]: http://i.stack.imgur.com/YsWXc.png

  2. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    40
    Vote Rating
    0
    Gery is on a distinguished road

      0  

    Default


    So, before the url must be sent in the first place, I need to change it, how could I do it? pls help, thanks

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    40
    Vote Rating
    0
    Gery is on a distinguished road

      0  

    Default


    getting closer... because adding
    Code:
    OpenLayers.loadURL(myurl, {}, null,  function(response){});
    in the handler function sents the url to XMLHttpRequest.js (right place), but just immediately another url (from the formpanel) is sent to the same place and this covers the right one, is there a way to add some timing to the openlayers.loadurl function? I understand this function works asynchronously (that's why is faster and gets submitted first than the second one), is there a way to just overwrite the second one?

    asI4w.png

  4. #4
    Sencha User
    Join Date
    Jun 2012
    Posts
    40
    Vote Rating
    0
    Gery is on a distinguished road

      0  

    Default


    The solution was to simply take the protocol outside the formPanel and use "protocol.options.url = newUrl;"

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi