SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    js form that redirects to url based on input?

    I am a javascript idiot, but what I am looking to do is have a simple form, that for instance if you entered "001" and hit GO, it would take you to site.com/001, and if you entered 002, if would take you to site.com/002, etc.

    Any idea how I should go about this?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,147
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    js redirect to URL

    Hi notluap, welcome to the forums,
    Have a function that gets the values from the form inputs and passes that to a
    HTML Code:
    document.location.href = "http://www.site.com/" + form_value;


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
  •