Reputation: 1
On a page URL like :
http:mysite.com/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=3&cntnt01returnid=15
Using location.href will return
http://mysite.com/index.php?mact=News,cntnt01,detail,0
is there a way to get the full URL including '...&cntnt01articleid=3&cntnt01returnid=15'
Thanks
Henri
Upvotes: 0
Views: 420
Reputation: 46647
If your URL was well-formatted then the querystring would be available in the window.location.href
.
http://en.wikipedia.org/wiki/Percent-encoding
The comma is a reserved character in a URI and should not be used as a part of your querystring vales. Also, you should be URI-Encoding your url. This is done in javascript by calling encodeURI.
Related: Can I use commas in a URL?
Upvotes: 2