www.webdeveloper.com
Results 1 to 7 of 7

Thread: Dynamic Linking With a Form?

  1. #1
    Join Date
    Jul 2008
    Posts
    52

    Dynamic Linking With a Form?

    I'm really how to refer to what I want to do, hopefully I can explain myself.

    Basically, what I want to do is create a form, where the person enters their name, then when they hit submit, it takes them to a link that automatically appends their name to the end of the link.

    So say the link is "http://www.something.com/". Then the user enters their name, Billy Brown, for example, and when they hit submit, it takes them to "http://www.something.com/billy-brown/".

    Does anyone know how I might be able to accomplish that?

  2. #2
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    URL re-writing, exactly how to implement depends on your host and language.
    Ryan Butler

    Ryan Butler.org

  3. #3
    Join Date
    Jul 2008
    Posts
    52
    Yeah, I know that I could rewrite URL's within the site. The link will go off-site though. So it needs to be some kind of a clever form action.

  4. #4
    Join Date
    Jul 2008
    Posts
    52
    No other ideas how I might be able to accomplish this?

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Server-side scripting or JavaScript
    At least 98% of internet users' DNA is identical to that of chimpanzees

  6. #6
    Join Date
    Jul 2008
    Posts
    52
    Quote Originally Posted by Fang View Post
    Server-side scripting or JavaScript
    I know that it's going to be one of those. But I really need a little more detail. I can't write from the ground up, but with a few more specific pointers, I should be able to sniff out a solution.

    Or, if there's even a technical term for what I want to accomplish, that would also be really, really helpful.

  7. #7
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <form action="http://www.someething.com/" method="post" name="form1" onsubmit="this.action=this.action+this.folder.value+'/'; this.submit(); return false;">
    <label>Your name: <input type="text" name="folder"></label>
    <button type="submit">submit</button>
    </form>
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles