search engine ASP script - GET vs POST

Discussion in 'ASP General' started by Kevin Blount, Apr 8, 2005.

  1. Kevin Blount

    Kevin Blount Guest

    I love Google groups, you can find answers to ALL your questions here..
    right? :)

    I'm building a search script in ASP (not progressed to ASP.NET just
    yet) and everything works. The problem I was having though was when
    users move through the different pages of a set of returned results,
    and then pres the browser "Back" button, they saw the "Warning: Page
    has Expired" message, and had to refresh.

    I fixed this by changing my form from POST to GET and now users can go
    back through their browsers history and see previous pages of results.

    But, and you know what's coming, GET is fugly!! I don't want all that
    garbage in my URL, spoiling a nice pretty website. So, here's the
    question (though I suspect I know the answer <frown>):

    Is there a way to use GET but still POST the form entries? or maybe use
    POST but append 1 item to the URL?

    I wondering if using a temp (i.e. without an expiry date) cookie could
    contain most of the info, such as search string, scope, language, etc,
    and just keeping page=X in the URL. That I could live with and stick
    with GET. but if I can get rid of ALL pairs from the URL, and/or go
    back to using POST without the "Warning: Page has Expired" message,
    then that would be ideal!

    any thoughts, hints, links, etc would be most appreciated.

    Kevin
     
    Kevin Blount, Apr 8, 2005
    #1
    1. Advertising

  2. Kevin Blount wrote:
    > I love Google groups, you can find answers to ALL your questions
    > here.. right? :)
    >
    > I'm building a search script in ASP (not progressed to ASP.NET just
    > yet) and everything works. The problem I was having though was when
    > users move through the different pages of a set of returned results,
    > and then pres the browser "Back" button, they saw the "Warning: Page
    > has Expired" message, and had to refresh.
    >
    > I fixed this by changing my form from POST to GET and now users can go
    > back through their browsers history and see previous pages of results.
    >
    > But, and you know what's coming, GET is fugly!! I don't want all that
    > garbage in my URL, spoiling a nice pretty website. So, here's the
    > question (though I suspect I know the answer <frown>):
    >
    > Is there a way to use GET but still POST the form entries? or maybe
    > use POST but append 1 item to the URL?
    >
    > I wondering if using a temp (i.e. without an expiry date) cookie could
    > contain most of the info, such as search string, scope, language, etc,
    > and just keeping page=X in the URL. That I could live with and stick
    > with GET. but if I can get rid of ALL pairs from the URL, and/or go
    > back to using POST without the "Warning: Page has Expired" message,
    > then that would be ideal!
    >
    > any thoughts, hints, links, etc would be most appreciated.
    >
    > Kevin


    You can use client-side code to modify your form's action attribute, adding
    querystring values to it, regardless of what your form's method is. Please
    follow up in a client-side scripting newsgroup, such as .scripting.jscript.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Apr 9, 2005
    #2
    1. Advertising

  3. Kevin Blount

    Kevin Blount Guest

    Bob, your message is a tease :D can you be more specific here, in this
    newsgroup, otherwise the information you've given isn't enough for me
    to pose the new question in script.jscript (shudder), as per your
    "instruction".
     
    Kevin Blount, Apr 9, 2005
    #3
  4. Kevin Blount

    Jeff Cochran Guest

    On 9 Apr 2005 05:25:58 -0700, "Kevin Blount" <>
    wrote:

    >Bob, your message is a tease :D can you be more specific here, in this
    >newsgroup, otherwise the information you've given isn't enough for me
    >to pose the new question in script.jscript (shudder), as per your
    >"instruction".


    Modify the form information returned by the client for the page, so
    that your page receives the form information back when you reload the
    page. The actual coding is client-side, basically simple HTML, so not
    on topic here and better results would be had in a client-side group.

    Basically, server-side on a new submission the form is blank. On a
    return, the fields are populated in the form so that information gets
    sent to the server, which then reads the values with the Request.Form
    method and populates the form for resubmission. Usually a hidden
    field is used to check if this is the first submission, and if not,
    read the values and populate the form.

    Jeff
     
    Jeff Cochran, Apr 11, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmViQnVzaGVsbA==?=

    Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine?

    =?Utf-8?B?SmViQnVzaGVsbA==?=, Oct 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    749
    =?Utf-8?B?SmViQnVzaGVsbA==?=
    Oct 22, 2005
  2. Sasha
    Replies:
    3
    Views:
    628
    Sasha
    May 22, 2007
  3. pandi
    Replies:
    5
    Views:
    483
    pandi
    Dec 14, 2009
  4. Abby Lee
    Replies:
    5
    Views:
    483
    Abby Lee
    Aug 2, 2004
  5. Public Interest

    Looking for a search engine submit script

    Public Interest, Oct 6, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    142
    Tad McClellan
    Oct 6, 2003
Loading...

Share This Page