SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    search term to remain in box after search

    I'm working on a site with a search fuction and we want the search term used to be in the search box on the results page. Is this something that's relatively simple to do in Javascript, or do we need to get into the ASP code?
    ...KartLink...

  2. #2
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There is a way in JS (I don't remember it), but in ASP it's just:

    value="<%=request.form("name")%>"
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  3. #3
    SitePoint Addict superbird's Avatar
    Join Date
    Aug 2000
    Location
    Swansea, UK
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks
    ...KartLink...

  4. #4
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the way to do it in JS has something to do with QueryStrings. You can use the GET method for your search and then grab the QueryString (www.url.com?search=searchterm) using some JS code. I believe its like this:
    Code:
    var str=location.search


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
  •