Connecting Tech Pros Worldwide Help | Site Map

Reading parameters using js, from a url

  #1  
Old July 23rd, 2005, 10:34 PM
Randell D.
Guest
 
Posts: n/a

Folks,

Can someone give me some pointers on how I can read one or more
arguements from a url, using js?

Why? I'm working on a LAMP based project and when a user successfully
registers, the header redirects to the login screen - I'd like to check
for the value of register, if read from:

http://www.mydomain.com/index.html?register=success

A pointer/hint as opposed to a solution should be sufficient because I'm
doing pretty well learning javascript.

Much appreciated,
Thanks,
Randell D.
  #2  
Old July 23rd, 2005, 10:34 PM
VK
Guest
 
Posts: n/a

re: Reading parameters using js, from a url


Use window.location.href properties, especially
window.location.href.search may be useful.

String's method split() (by "&" first, then by "=") will finish the job.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help gunimpi answers 0 January 10th, 2007 08:55 PM
Function declaration inside other function Larax answers 28 December 16th, 2006 02:45 PM
How a delete a object from DOM ? Cylix answers 22 August 12th, 2006 11:55 PM
where to find rules about punctuation in JavaScript dynamic table population murrayatuptowngallery@yahoo.com answers 7 October 16th, 2005 08:05 AM