Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- JavaScript to read a URL query string?


tedster - 1:21 am on Oct 28, 2002 (gmt 0)


For
http://example.com/page.html?a=xxx, the two lines below should return the value after the "=" for the variable "xxx":

fullURL = parent.document.URL
xxx = fullURL.substring(fullURL.indexOf('?')+3, fullURL.length)

It says to "Take the text string of the URL. Use a substring beginning three past the position of the "?" and going through the end of the text string.


Thread source:: http://www.webmasterworld.com/javascript/216.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com