I am wanting to do the following with JavaScript to enhance a MIDI jukebox on my site. I currently opening a page from a random redirect script which has everything prepared on it. What I would like to do is do the same by using 1 page and using a ? after the address to insert the information.

After the question mark I would like to put information to be included on the page. What I don't know how to do is to separate the information after the ?
I want to create 4 variables from the information:
First 12 letters - file name
Next 2 numbers - length in minutes
Next 2 numbers - length in seconds
Any text after that - song name

For the final bit of text I would like to include spaces in it. I assume I can do this by replacing one character (eg +) with a space but how do I do that?

For Example: http://pageurl.html?filenam.mid0326Song+Name+Here

to make the variables:
Song Name Here

Can anyone post the code I would need to take this information from after the ? in the URL and assign it to the variables?


David Gowans