Author: Chaplain Doug | Posted on: 4/1/2009 8:30:35 AM | Views : 1228

VWD 2008 Express.  Visual Basic. Javascript.

I have the following script which is part of a larger script that maps addresses for me using Goog Maps API.  But my question is just a Javascript question.  When I trap the address error (because Google Maps cannot find it), I want to cop off the street address part and just leave city and state.  For example, if address below resolves to "123 Peregory Lane,Charlottesville,VA 23901" and it is trapped, then I want to make address equal "Charlottesville, VA 23901".  How can I (with javascript) manipulate the variable address and remove everything up to and including the first comma?  I know how to do this in VB but not javascript.  Thanks for the help.

if (!point) {
   alert(address + " not found");
}
else {
  map.setCenter(point, 6);< ...

Go to the complete details ...