473,411 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

search engine ASP script - GET vs POST

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

Jul 22 '05 #1
3 2229
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"
Jul 22 '05 #2
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".

Jul 22 '05 #3
On 9 Apr 2005 05:25:58 -0700, "Kevin Blount" <ke***@questionmark.com>
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
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rod | last post by:
Hi, i am doing a ecommerce website and would like to implement a search engine to find products. All the serach engine I have found on the web are parsing html page! This is not what i want. i...
2
by: Benny Alexander | last post by:
Hi, We are developing a CMS in ASP and before we write the code for a complete site search script and Forum, we want to check if is there any good ones? Kindly please let us know. Thanks in...
2
by: Patrick | last post by:
Are the differences between a search engine, a subject directory and a meta search engine significant for an ebusiness web site owner? A meta search engine merely uses ordinary existing search...
4
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then...
8
by: Sandy Pittendrigh | last post by:
I have a how-to-do-it manual like site, related to fishing. I want to add a new interactive question/comment feature to each instructional page on the site. I want (registered) users to be able...
4
by: zakhirn | last post by:
Hello, I have an extremely new user to XML and XSL, and I would like to know how to search XML data via a input form in HTML, and have the results displayed in HTML. If anyone has code that...
1
by: cglewis03 | last post by:
Hello, I am trying to build a search form with several different options to choose from. Currently it is set up to open within the same window if a single option is selected and open within a...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.