This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Getting values from URL using jQuery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Getting values from URL using jQuery" Watch "Getting values from URL using jQuery" New topic
Author

Getting values from URL using jQuery

Prasanna Raghavendar
Greenhorn

Joined: Sep 15, 2011
Posts: 19
Hi,

"http://localhost:8080/ProjectV2/MapPage.jsp?latitude=13&longitude=80"
How am I supposed to get the latitude and longitude values from this URL using Javascript or jQuery?

Thanks
Prasanna
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

The location property gives you the current URL. You can then use regular expressions to parse if for what you are looking for.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Prasanna Raghavendar
Greenhorn

Joined: Sep 15, 2011
Posts: 19
Thanks Jeanne.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting values from URL using jQuery