?
Solved

OnChange of Dropdown - Write value of adjacent column to page

Posted on 2003-02-22
5
Medium Priority
?
302 Views
Last Modified: 2008-02-26
Help!
Upon making a selection from a dropdown menu, which selects a value from a table in a recordset....I want to write the value (say, in a text box in form) contained in another column in the selected record.  

Using javascript/ASP

Columns in recordset are:

ID | Model | Color

code for dropdown:
<select name="Model" class="textboxes" id="select" title="<%=(rsModels.Fields.Item("Model").Value)%>">

I think I should be able to insert an onChange event handler inside this select tag and write (to a text box)
where the value of "Color" that corresponds to this "Model" but can't get syntax right.

Any suggestions?
Thanks much!  
0
Comment
Question by:lllcooljon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Accepted Solution

by:
Wakie earned 400 total points
ID: 8001996
Perhaps something like this?

<SCRIPT LANGUAGE="JavaScript">
    <!--
    function dropChange() {
         document.formName.band_name1.value = document.formName.dropDown.value;
         return;
    }
    //-->
</SCRIPT>

<form action="script.asp" method="post" name="formName">
    <input type="text" size="30" name="band_name1">
    <select name="dropDown" onChange="dropChange()">
         <option value="band1">band1</option>
         <option value="band2">band2</option>
         <option value="band3">band3</option>
         <option value="band4">band4</option>
    </select>
</form>

REF: http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20495929.html

Regards,
Wakie.
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8005084
lllcooljon,

Try to check out the link... might help...

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20443483.html

HAppy programming...
0
 

Expert Comment

by:CleanupPing
ID: 9576939
lllcooljon:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9754291
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by Wakie

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question