Replace city & state in URL dynamically for searching & displaying weather

  • 1
  • Question
  • Updated 5 years ago
Hello,

I am a student and I am fairly new at developing. I am trying to do two things for an app. I want the user to be able to click on a button that says "Current location" and give them weather for their current location. I got this to work perfectly! :)

The second thing I want the user to be able to do is to search for a city and pass that city name into the URL and then give them the weather for the city they searched for. I have looked over the sample code in the documentation but I still havent been able to figure this out. Can someone point me in the right direction? I am using javascript and jquery for all of the code and then some ajax.

For example, in this code I want the "cedar_rapids" portion to be dynamic.

Thanks!!!
Monique
Photo of mveenstra

mveenstra

  • 4 Posts
  • 0 Reply Likes
  • happy.

Posted 5 years ago

  • 1
Photo of mveenstra

mveenstra

  • 4 Posts
  • 0 Reply Likes
I got it to work! Nevermind:)

I cant find a delete question option, sorry.