Javascript Callback situation

AWARDED
Project Budget (USD)
$30

Project Description:
I not an expert on JavaScript but i putted together some code taken from here: http://msdn.microsoft.com/en-us/library/cc451895.aspx to limit a Virtuemart shopping cart to sell products to a defined area.

I geocode the address submitted by the user, then check if the Lat and Long point is within the polygon defined by an array of lat and logs. I have all this and works.

The code works but I'm having a callback problem. The first time I click submit to call the function it does the process but i can get the value of the variable until the second time i click submit.

If you have strong JavaScript skills or JavaScript + PHP this make take u a few minutes to solve it. All the code is in placed, i just may need to do some rearrangement on the flow.

The Virtuemart file i modified is: \administrator\components\com_virtuemart\classes\ps_userfield.php

This file will be provided on proposal acceptance.

Thanks.

Skills required:
PHP
Project offered by:
Verified