Skip to content

Instantly share code, notes, and snippets.

@dydx
Created March 25, 2015 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dydx/5bca7ef7b66b74dbffca to your computer and use it in GitHub Desktop.
Save dydx/5bca7ef7b66b74dbffca to your computer and use it in GitHub Desktop.
pass database entry id through window.location.hash
var work_order_id = $(location).attr('hash').substring(1);
$.getJSON('http://192.168.3.193:8000/api/' + work_order_id, function(data) {
$('#work-info').append(
'<li style="text-decoration: none;">' + JSON.stringify(data[0].properties.name) + '</li>'
)
$('#map').attr('src', '/admin/map-test.html#' + work_order_id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment