Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very Beginner, Page query ...

Status
Not open for further replies.

daniloa

Programmer
Nov 23, 2001
27
BR

Hy people,

I have a problem and I don't what I have to do to get out him.

First I'm a begginer ASP developer.

Well my question is:

I have a page with many text fields and a select and a textarea at side of this select.
Ok I need that when the user click (or select) some option of the select input I do a database query and send the return to the textarea, but all of this without lose any information of the text fileds and the select input, in other words I need to return at the same page without reset.

How do I this ????

Very thaks,

Danilo ...
 
Well, good question. I have never tried to do that without reset, and think it's impossible because you have to submit the query in order to get the result, and each submit resets the form. On the other hand, you can save the initial values (in variable, cookie or QueryString) and then preload them to your text fields in the select input.
 
The best way to do this is with some client-side scripting. Probaby javascript or VBScript.

What you would essentially do is create a variable for each possible value of the textarea. And then you would build a onSelect command for the drop down box, so that when they selected a value, the javascript changed the value of the textarea to what ever the value of the appropriate variable is. This way you are allowing the user to see what you want them to see in the textarea, and you don't have to reload the page so you don't lose the values of the other text boxes.

Now, my problem is that I am a little rusty at javasript, so any attempts that I might make and a example would probably be wrong, but hopefully I have pointed you in the right direction?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top