0

Using Wordpress on 4 sites I just created for a client. I have a sidebar with a script that uses Google Maps API and estimates taxi fare. The script is working fine on the home page, but doesn't work on any of the secondary pages. What would be causing this behavior? One of the sites is http://yellowcaboffolsom.net. Try the calculator on the home page, then try it on any of the other pages. I'm stumped on this one. Jake B

3
  • It would be helpful if you posted the actual code in question here so we dont have to go searching for it.
    – Josh Mein
    Jun 3, 2012 at 2:35
  • You have a gmaps api key for all domains and set up correctly?
    – Oliver
    Jun 3, 2012 at 2:38
  • The API key has the domains setup like this: sacramentoairporttaxi.net/* sacramentotaxi.us/* yellowcaboffolsom.net/* longdistancetaxicab.com/*
    – JakeB
    Jun 3, 2012 at 15:37

2 Answers 2

0

I'm not sure if this is your entire problem, but on that site, the function book2() is assigning a value to a variable named pickUp, but the variable you initialized is named pickUP (with a capitalized "P". I'd say first step is making the variable names match, and then you can see if the other issue still reproduces.

1
  • I don't think that value is used at all. I fixed it but the problem persists.
    – JakeB
    Jun 3, 2012 at 15:34
0

Open up the console, hit the button, and it tells you the issues.

Uncaught ReferenceError: pickUp is not defined /make-taxi-reservations/?destinationF=1689+Arden+Way%2C+Sacramento%2C+CA&destinationF=1600+Exposition+Boulevard%2C+Sacramento%2C+CA&address1=1689+Arden+Way%2C+Sacramento%2C+CA&address2=1600+Exposition+Boulevard%2C+Sacramento%2C+CA#:220
Uncaught TypeError: Cannot read property 'value' of undefined myScript.js:9

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.