SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: url clickthru

  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    url clickthru

    I suspect javascript is the best way to do this but I'm not sure. I want to create a simple form field where part of a url is a variable that the user enters and then when they click, it clicks through to the url based upon what they input. The url would not be submitting to a script or anything just to a URL. In some cases off site. So for example:

    Number of rooms in your house:
    _______________
    | Enter Text Here | Submit
    _______________

    When submitting all of the URL except the variable would be predefined and the page would click through when they hit Submit e.g:

    http://domain.com/rooms/VARIABLE/house.html

    Any insights appreciated.

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

    pass var

    Can't you just use a GET variable like
    http://domain.com/rooms/house.html?rooms=variable

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no because in some cases the URL is off site and there is no scripting involved.

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

    vars in urls

    I suppose you could concatenate the url like
    "http://domain.com/rooms/" + variable + "/house.html"

  5. #5
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's what I want to do, the question is: how?

  6. #6
    SitePoint Evangelist
    Join Date
    May 2005
    Location
    Houston, Texas, USA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [QUOTE=Mittineague]Can't you just use a GET variable

    moved, sorry
    Opportunity favors the prepared mind.


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
  •