Skip to content

Instantly share code, notes, and snippets.

@briandiaz
Created May 29, 2015 17:27
Show Gist options
  • Save briandiaz/d9c03d9d899c7fb07fd2 to your computer and use it in GitHub Desktop.
Save briandiaz/d9c03d9d899c7fb07fd2 to your computer and use it in GitHub Desktop.
Get url Params by a GET Request and then set the values in a form.
jQuery ->
set_employee_registration_params = () ->
url_params = window.location.search.replace("?","").split("&")
for params in url_params
key_value = params.split("=")
id = key_value[0]
value = key_value[1]
$(id).val(value)
set_employee_registration_params()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment