Results 1 to 5 of 5

Thread: Get URL Parameters

  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Get URL Parameters

    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


    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
    Last edited by jscheuer1; 02-24-2009 at 09:50 AM. Reason: remove inadvertent links

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Like

    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.
    Last edited by jscheuer1; 02-24-2009 at 03:03 PM. Reason: remove unnecessary link

  4. #4
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi guys I got it must be written in php not in Javascript.

    Thanks for your help guys.

    Chedo

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •