www.webdeveloper.com
Results 1 to 3 of 3

Thread: Redirecting to particualr page from data from a field

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Question Redirecting to particualr page from data from a field

    Hi

    I am trying to set up a redirection button from my main page and am struggling to find any help on the code needed. All I need is for a user to input a number of the directory they are after ie 46573 and then the index page in the said directory to load up. I need to somehow take the data from the unsername field and add it to the redirect code. There is no need for any security in this process. I have spend hours on trying to find how to do this but it doesn't seem to be used or needed much as there are no comments on how.

    Examples:

    username : 46573

    which would then redirect to

    www.mywebsite.co.uk/46573

    next person may be

    username : 99872

    which would then redirect to

    www.mywebsite.co.uk/99872

    Thanks in advance for any help.......

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,143
    Very simple with some javascript. Here's an example:
    http://jsfiddle.net/dfreema1/LtY9J/1/

    Obviously, the URL's aren't set up here, so it fails. But if you copy the code to your site, you should be able to simply type in the 894129 (username) into the box.

  3. #3
    Join Date
    Oct 2012
    Posts
    2

    Wink

    Worked a treat !,

    Thank You

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