Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

three values for a function +google maps

Status
Not open for further replies.

onressy

Programmer
Mar 7, 2006
421
CA
Hi I'm wondering if i'm passing the values to the function correctly, as it doesn't seem to work. Im using the google maps API, and this call:

var p1 = marker.getPoint().lat().toString();
var p2 = marker.getPoint().lng().toString();

//alert(p1+":"+p2); gives me the correct values

but this doesn't seem to work as the p1,p2 values are undefined when passed to the function:

document.write "<input type='radio' value='1' name='Contrib' onChange='javascript:a1(this.value,"+p1+","+p2+"'>Yes &nbsp;&nbsp;<input type='radio' value='0' name='Contrib' onChange='javascript:a1(this.value,"+p1+","+p2+"'>No<br />"

also, the value of the radio (this.value) does get passed to the a1 function, its just the p1 and p2 values that i can't seen to pass as they are undefined... any thoughts on this? Its been a late night...Thanks
 
figured out the quote/apostrophy issue

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top