Connecting Tech Pros Worldwide Help | Site Map

Reading parameters using js, from a url

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 09:34 PM
Randell D.
Guest
 
Posts: n/a
Default Reading parameters using js, from a url


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, 09:34 PM
VK
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.