# Passing variables via GET from one page to javascript on another page

**URL:** <https://forum.kirupa.com/t/passing-variables-via-get-from-one-page-to-javascript-on-another-page/310891>\
**Category:** Uncategorized\
**Created:** [June 22, 2010, 2:48pm UTC](https://forum.kirupa.com/t/passing-variables-via-get-from-one-page-to-javascript-on-another-page/310891 "2010-06-22T14:48:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [June 22, 2010, 2:48pm UTC](https://forum.kirupa.com/t/passing-variables-via-get-from-one-page-to-javascript-on-another-page/310891/1 "2010-06-22T14:48:20Z")

</div>

Still just getting my head around PHP/Javascript.

I’m trying to get some values from page 1 to page 2.

On page 1, I have a link:

\<a href=“userdata\_map.php?lat=43.471079&lng=-89.744310”\>Edit This Map\</a\>

On page 2, I have an initialize function that contains this:

var latlng = new google.maps.LatLng(parseFloat(\<?php $\_GET[“lat”]; ?\>), parseFloat(\<?php $\_GET[“lng”]; ?\>));

However this doesn’t seem to be working. The source of page 2 just shows this:

var latlng = new google.maps.LatLng(parseFloat(), parseFloat());

How do I make this work?

Thanks.
