PDA

View Full Version : Get URL Parameters



chedo
02-24-2009, 09:16 AM
HEllo I am creating a script with javascript that get the url parameters but I can't solve it.

If my website is mywebsite.com
When sombody goes with mywebsite.com/Jack
The javascript will get the parameters after the slash and shows it in html. In this case javascript will show Jack on the screen

I have this at the moment found
Here (http://www.netlobo.com/url_query_string_javascript.html)


I didn't know how to do it or with wich script with Javascript or htaccess ??
Could somebody help me please

Sorry for the bad English

jscheuer1
02-24-2009, 09:54 AM
Well, this:


mywebsite.com/Jack

points to a folder. If the Jack folder has an index file in it it will show up, otherwise there will be either a directory listing of the contents of the folder, or if the server doesn't permit that, whatever the server shows when it doesn't permit directory listings.

So, there really is no javascript required. If you have an index page in the Jack folder, you can hard code Jack on it.

chedo
02-24-2009, 02:23 PM
Hello jscheuer1

For example: pimpmysearch.com/homepage.html?gname=Jack
When somebody Replaces Jack it will be shown on the page .
I want it like that but output as text.

chedo
02-24-2009, 02:40 PM
Hi guys I got it must be written in php not in Javascript.

Thanks for your help guys.

Chedo

jscheuer1
02-24-2009, 03:01 PM
That's different. Javascript can do that, but for reliability in cases where the user has javascript disabled, a server side language like PHP, asp, etc. is much better.