473,668 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2234
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.jscr ipt.

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
"instructio n".

Jul 22 '05 #3
On 9 Apr 2005 05:25:58 -0700, "Kevin Blount" <ke***@question mark.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
2610
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 want to search within my mysql database. But using: - several columns (title, description) - several tables (the product table is linked with another table which
2
2330
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 advance Benny
2
11838
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 engines. A subject directory classifies websites into some category. Could anyone point me towards the differences between these three that are significant for an ebusiness web site owner?
4
1877
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 copy the URL to his own web page, that I might be penalized because my page would include that text on the resulting page. For example, let's say that "GOD LOVES JOKES" has negative connotations. Someone could create:
8
2245
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 to add comments at the bottom of each page, similar to the way the php, mysql, apache manuals work. PUNCHLINE_A:
4
2112
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 can do that, could you please post the relevant files. I have searched the internet for a while now, and have been completely unsuccessful. I would like to do it using javascript in my XSL file if possible, or using CGI script to search the XML...
1
2520
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 frameset if the "ALL" option is selected. Is there anyway to get the results to open in new windows? So if the user were to select the "ALL" option, is it possible to open 3 new windows with each result displaying? Here is my code:
3
3420
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. Filename : search_student.php <?php include("../user_access/user_access_control.php"); include("../Database/database.php"); $searchStudentControl = new Access_user;
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8382
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5682
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.