Hey I have recently written a handler for getlocations module and had few questions regarding the views handler function Function query and the drupal behaviours.
I am not sure if this is the right place to ask a question about drupal behaviours but atleast I believe I can learn a little about the views handlers.

I wrote a filter handler for the view which actually has a filter form and the filter form is taking an input value which is a zipcode and I have wrote a js file which using drupal behaviour listens to the click function on the views exposed form and then takes the form inputs and calculates some latitude and longitude values in jquery at the browser side and submitted that values from js (jquery) to views handler file to the same form which has two text fields .Now here is the real issue that I am not able to figure out the function query is supposed to take those values after the js sets the values of the form and use them to calculate and query the database.
What actually is happening is the the function query is fired of as soon as the apply button in the views exposed form is pressed and the query is calculated based taking the previous values of the latitudes and longitudes instead of the recent values and this I believe because both the JS for the handler(written outside the handler) and function query in the handler are fired at the same time and the $this->value ['lat'] which is the form value in the filter form is taking the previous set value or should I say the preset existing value instead of waiting for the new one set by the js to come in .After the function query is calculated the new values for latitude and longitude are set now which are of no use
My questions how can I make the function Query to take the recently calculted values instead of the previous ones.Is there a way I can tell the function Query to use $this->value['lat'] latest?

where value is the tree defined in the form.If it is a drupal behaviours issue can some one point me to those links or issue form please.
PLease help me in this regard any sort of pointers or experience is welcome.

Comments

MustangGB’s picture

Status: Active » Closed (outdated)