Forums
This topic is locked
keeping search items in form
Posted 23 years ago
1
has voted
23 years ago Bill Patterson posted:
I have 4 text boxes in a form that talks to a SQL db. When submit is clicked all the information that is in the search boxes clears. I want to keep that information in the text boxes so it can be used to change or add information to further refine the search. How is that done. I'm a newbe Replies
Replied 23 years ago
23 years ago Joel Martinez replied:
quite easily... whatever the page is that recieves the post, put this in the value of the text boxes.
<%=request("nameoftextbox"
%>
of course you would change "nameoftextbox" to whatever the field name is. this puts the value that came into the page, as the default for the textbox.
Joel Martinez
joel@udzone.com
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
<%=request("nameoftextbox"

of course you would change "nameoftextbox" to whatever the field name is. this puts the value that came into the page, as the default for the textbox.
Joel Martinez
joel@udzone.com
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"

Replied 23 years ago
23 years ago Bill Patterson replied:
Thanks!!! Works like a champ! Now I just need to fix a problem with going from the results page to detail page. I have the results page list 10 records and have set a column as the index link to bring up a single record into the details page. Instead it brings up the first record in the record set. Ignoring the one that was selected. Weird.
Replied 23 years ago
23 years ago Bill Patterson replied:
Fixed all of the above....Thanks. Except one last "do you know?" The <%=request("nameoftextbox"
%> code works even in menu.list boxes but it doesn't show what the select is in the menu/list box. I have the <%=request("nameofbox"
%> value set for the value of the default of "select" in the menu/list box and it works in keeping the value selected but you can't tell because it just shows "select".

