469,275 Members | 1,717 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

how to retain values after submit


I have a search page where you can fill in a search text and have som
options to specify your search.

after submit I want that the user's input (before submit) is bein
shown. Currently, after each submit the values are set back t
default.

how can i do this

Dir
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message32686.htm

Jul 20 '05 #1
3 5765
is the page submitting to itself or to a new page with the exact same form?
an url to the page with the problem would help :)
anywayi would do it something like this:

<input name="whatever" value="<%= request.form("whatever") %>">

using VBscript

Dirk <Di*********@mail.forum4designers.com> wrote in message news:<Di*********@mail.forum4designers.com>...
I have a search page where you can fill in a search text and have some
options to specify your search.

after submit I want that the user's input (before submit) is being
shown. Currently, after each submit the values are set back to
default.

how can i do this?
Dirk
------------------------------------------------------------------------
Posted via http://www.forum4designers.com
------------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message32686.html

Jul 20 '05 #2

the page is submitting to itself. I could use the server side of course
but maybe there is a simple solution using javascript?

Dir
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message32686.htm

Jul 20 '05 #3
On Thu, 15 Jan 2004 17:36:15 -0600, Dirk
<Di*********@mail.forum4designers.com> wrote:
the page is submitting to itself. I could use the server side of course,
but maybe there is a simple solution using javascript?!


If you can you server-side scripting, that would be your best course of
action - it would always work, then.

With JavaScript, you could only populate the controls:

1) If JavaScript is enabled, and
2) If the form was submitted using the GET method.

If the form was submitted using POST, there is no way for JavaScript to
access the values. With GET, it is just a simple matter of parsing the URL
parameters.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ANTISPAM_garycnew_ANTISPAM | last post: by
6 posts views Thread by Ian Davies | last post: by
2 posts views Thread by farukcse | last post: by
3 posts views Thread by raaman rai | last post: by
1 post views Thread by zhtway | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.