File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30518
    
150

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting values from URL using jQuery