ASP
--
Questions
--
Followers
Top Experts
I am using s scrip i found on the net about asp and multiple dropdown boxes
but i need if possible to take the ifo gather by the dropdowns and in the last one
place it in another text field in the asp page.....
so i have
dropdown
dropdown
dropdown
textfeild
now even better would be that the text field only apears once the last dropdown option is selected
is this possible??
my code so far is below
note i have change some of the fields to suite my needs
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>OptionEx Include</TITLE>
<!--include the library-->
<script language=Javascript src="optionex.js"></script
<script language=Javascript>
//create ourlink list of different model Series
var oModelSeries = new OptionCollection();
//add a few entries this can also be written via asp dynamically
//3 series
oModelSeries.Add("Lancer",
oModelSeries.Add("Evolutio
//5 series
oModelSeries.Add("Getz","G
oModelSeries.Add("Sonata",
oModelSeries.Add("Grandure
//7 series
oModelSeries.Add("Camry","
oModelSeries.Add("Corolla"
oModelSeries.Add("Avalon",
//okay so we have all the series for the models.
//lets add the colors of the series.
//again this can be written dynamically
var oSeriesColors = new OptionCollection();
oSeriesColors.Add("15000",
oSeriesColors.Add("14000",
oSeriesColors.Add("20000",
oSeriesColors.Add("19000",
oSeriesColors.Add("18500",
oSeriesColors.Add("17500",
oSeriesColors.Add("30000",
oSeriesColors.Add("29000",
</script>
</HEAD>
<BODY>
<p align=center>
<table>
<form name=carform id=carform>
<tr>
<td> <table>
<tr>
<td><font face=arial size=2> <p class=MsoNormal> </p>
</tr>
</table></td>
</tr><tr>
<td> <table>
<tr>
<td colspan=6><font face=arial size=2><b>Example :&n
the Model of interest and get all avaliable Series and color(s)</font></td>
</tr></tr>
<tr>
<!--parent select-->
<td align=right valign=top><font face=arial size=2><b>Model :&nbs
<td align=left valign=top><SELECT name=model id=model onchange="UpdateSelect('se
<option value="">[Select a Model]</option>
<option value="7S">Toyota</option>
<option value="5S">Hyundai</option
<option value="3S">Mitsubishi</opt
</select></td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Series :&nb
<a href="javascript:clearOpti
All!</b></font></a> </td>
<!--blank dummy option, need for navigator to set the size of dropdown list-->
<!-- three options a list is fine-->
<!--IE dynamically resizes the width of the select navigator doesn't-->
<!--so just give the option blank space or caption to set the size-->
<td align=left valign=top><SELECT name=series id=series onchange="UpdateSelect('ca
<option>[Select a Series]</option>
<option></option>
<option></option>
<option></option>
</select></td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Color(s) :&
<a href="javascript:clearOpti
All!</b></font></a> </td>
<td align=left valign=top><SELECT name=carcolors id=carcolors>
<option>[Select a color(s)]</option>
<option></option>
<option></option>
<option></option>
</select></td>
</tr>
</table></td></tr>
</form>
</table>
</BODY>
</HTML>
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Here is a complete working example of the dropdown puting data in a textbox. I check with you later for followup questions:
==========================
<html>
<head>
<SCRIPT language="javascript">
function setText(pobjSelect, pstrTextName) {
var oText
oText = eval('document.' + pobjSelect.form.name + '.' + pstrTextName)
oText.value = oText.value + " " + pobjSelect.options(pobjSel
return
}
</SCRIPT>
<title>New Page 1</title>
</head>
<body>
<form method="POST" name="MyForm">
<p>Make a choice: <select size="1" name="MyList" onChange="setText(this, 'MyText');">
<option selected>-- Select One --</option>
<option value="A">100</option>
<option value="B">200</option>
<option value="C">300</option>
<option value="D">400</option>
</select></p>
<p>MyText: <input type="text" name="MyText" size="20"></p>
<p><input type="submit" value="Submit" name="Submit"></p>
</form>
</body>
</html>
==========================
Best Regards,
>apollois<
instead off just adding to it?
otherwise it is a great solution
thanks very much for your help






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Below is th erevise code... try to check it out...
<!-- saved from url=(0022)http://internet.e-mail -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>OptionEx Include</TITLE>
<!--include the library-->
<script language=Javascript src="optionex.js"></script
<script language=Javascript>
//create ourlink list of different model Series
var oModelSeries = new OptionCollection();
//add a few entries this can also be written via asp dynamically
//3 series
oModelSeries.Add("318","31
oModelSeries.Add("318s","3
oModelSeries.Add("320","32
oModelSeries.Add("325","32
oModelSeries.Add("328","32
oModelSeries.Add("M3","M3 Series","3S");
//5 series
oModelSeries.Add("520","52
oModelSeries.Add("525","52
oModelSeries.Add("535","53
oModelSeries.Add("540","54
oModelSeries.Add("M5","M5"
//7 series
oModelSeries.Add("735","73
oModelSeries.Add("740","74
oModelSeries.Add("750","75
//okay so we have all the series for the models.
//lets add the colors of the series.
//again this can be written dynamically
var oSeriesColors = new OptionCollection();
oSeriesColors.Add("318red"
oSeriesColors.Add("318navy
oSeriesColors.Add("318silv
oSeriesColors.Add("318swhi
oSeriesColors.Add("318snav
oSeriesColors.Add("320silv
oSeriesColors.Add("325whit
oSeriesColors.Add("325red"
oSeriesColors.Add("328navy
oSeriesColors.Add("328blac
oSeriesColors.Add("m3yello
oSeriesColors.Add("m3gray"
//5 series
oSeriesColors.Add("520red"
oSeriesColors.Add("520navy
oSeriesColors.Add("520silv
oSeriesColors.Add("525whit
oSeriesColors.Add("525navy
oSeriesColors.Add("535silv
oSeriesColors.Add("535whit
oSeriesColors.Add("535red"
oSeriesColors.Add("540navy
oSeriesColors.Add("m5yello
oSeriesColors.Add("m5gray"
//7 series
oSeriesColors.Add("735red"
oSeriesColors.Add("735navy
oSeriesColors.Add("740silv
oSeriesColors.Add("740whit
oSeriesColors.Add("740navy
oSeriesColors.Add("750silv
function checkifempty(){
document.carform.textfield
}
</script>
</HEAD>
<BODY>
<p align=center><h1>ASP Tips and Tricks</h1>
<table>
<form name=carform id=carform>
<tr>
<!--parent select-->
<td align=right valign=top><font face=arial size=2><b>Model :&nbs
<td align=left valign=top>
<SELECT name=model id=model onchange="UpdateSelect('se
<option value="">[Select a Model]</option>
<option value="7S">BMW 7 Series</option>
<option value="5S">BMW 5 Series</option>
<option value="3S">BMW 3 Series</option>
</select>
</td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Series :&nb
<a href="javascript:clearOpti
All!</b></font></a> </td>
<!--blank dummy option, need for navigator to set the size of dropdown list-->
<!-- three options a list is fine-->
<!--IE dynamically resizes the width of the select navigator doesn't-->
<!--so just give the option blank space or caption to set the size-->
<td align=left valign=top>
<SELECT name=series id=series onchange="UpdateSelect('ca
<option>[Select a Series]</option>
<option></option>
<option></option>
<option></option>
</select>
</td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Color(s) :&
<a href="javascript:clearOpti
All!</b></font></a> </td>
<td align=left valign=top>
<SELECT name=carcolors id=carcolors onChange="checkifempty();"
<option>[Select a color(s)]</option>
<option></option>
<option></option>
<option></option>
</select>
</td>
</tr>
<tr>
<td align=right valign=top colspan="6" height="29">
<div align="left">
<input type="text" name="textfield">
@</div>
</td>
</tr>
</form>
</table>
</BODY>
</HTML>
>>>>>>>
now even better would be that the text field only apears once the last dropdown option is selected
is this possible??
>>>>>>>
I manage to solve the above requirement try to check it out...
<!-- saved from url=(0022)http://internet.e-mail -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>OptionEx Include</TITLE>
<!--include the library-->
<script language=Javascript src="optionex.js"></script
<script language=Javascript>
//create ourlink list of different model Series
var oModelSeries = new OptionCollection();
//add a few entries this can also be written via asp dynamically
//3 series
oModelSeries.Add("318","31
oModelSeries.Add("318s","3
oModelSeries.Add("320","32
oModelSeries.Add("325","32
oModelSeries.Add("328","32
oModelSeries.Add("M3","M3 Series","3S");
//5 series
oModelSeries.Add("520","52
oModelSeries.Add("525","52
oModelSeries.Add("535","53
oModelSeries.Add("540","54
oModelSeries.Add("M5","M5"
//7 series
oModelSeries.Add("735","73
oModelSeries.Add("740","74
oModelSeries.Add("750","75
//okay so we have all the series for the models.
//lets add the colors of the series.
//again this can be written dynamically
var oSeriesColors = new OptionCollection();
oSeriesColors.Add("318red"
oSeriesColors.Add("318navy
oSeriesColors.Add("318silv
oSeriesColors.Add("318swhi
oSeriesColors.Add("318snav
oSeriesColors.Add("320silv
oSeriesColors.Add("325whit
oSeriesColors.Add("325red"
oSeriesColors.Add("328navy
oSeriesColors.Add("328blac
oSeriesColors.Add("m3yello
oSeriesColors.Add("m3gray"
//5 series
oSeriesColors.Add("520red"
oSeriesColors.Add("520navy
oSeriesColors.Add("520silv
oSeriesColors.Add("525whit
oSeriesColors.Add("525navy
oSeriesColors.Add("535silv
oSeriesColors.Add("535whit
oSeriesColors.Add("535red"
oSeriesColors.Add("540navy
oSeriesColors.Add("m5yello
oSeriesColors.Add("m5gray"
//7 series
oSeriesColors.Add("735red"
oSeriesColors.Add("735navy
oSeriesColors.Add("740silv
oSeriesColors.Add("740whit
oSeriesColors.Add("740navy
oSeriesColors.Add("750silv
function show(id) {
//if (ns4) document.layers[id].visibi
//else if (ie4)
document.all[id].style.vis
}
function hide(id) {
//if (ns4) document.layers[id].visibi
//else if (ie4)
document.all[id].style.vis
}
function textempty(){
document.carform.textfield
}
function checkifempty(){
show('divshowhide');
document.carform.textfield
}
</script>
</HEAD>
<BODY onload="hide('divshowhide'
<p align=center><h1>ASP Tips and Tricks</h1>
<table>
<form name=carform id=carform>
<tr>
<!--parent select-->
<td align=right valign=top><font face=arial size=2><b>Model :&nbs
<td align=left valign=top>
<SELECT name=model id=model onchange="UpdateSelect('se
<option value="">[Select a Model]</option>
<option value="7S">BMW 7 Series</option>
<option value="5S">BMW 5 Series</option>
<option value="3S">BMW 3 Series</option>
</select>
</td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Series :&nb
<a href="javascript:clearOpti
All!</b></font></a> </td>
<!--blank dummy option, need for navigator to set the size of dropdown list-->
<!-- three options a list is fine-->
<!--IE dynamically resizes the width of the select navigator doesn't-->
<!--so just give the option blank space or caption to set the size-->
<td align=left valign=top>
<SELECT name=series id=series onchange="UpdateSelect('ca
<option>[Select a Series]</option>
<option></option>
<option></option>
<option></option>
</select>
</td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Color(s) :&
<a href="javascript:clearOpti
All!</b></font></a> </td>
<td align=left valign=top>
<SELECT name=carcolors id=carcolors onChange="checkifempty();"
<option>[Select a color(s)]</option>
<option></option>
<option></option>
<option></option>
</select>
</td>
</tr>
<tr>
<td align=right valign=top colspan="6" height="29">
<div align="left" ID="divshowhide" STYLE="position:absolute;;
<input type="text" name="textfield">
@</div>
</td>
</tr>
</form>
</table>
</BODY>
</HTML>
HAppy programming...
Have you noticed that this question has been answered and is closed?
Best Regards,
>apollois<

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
<<<
Have you noticed that this question has been answered and is closed?
<<<
Sorry I encountered some difficulty in my connection...
When I posted my first comment it disconnected...
But decided to go ahead and find a solution to the problem...
Since I manage to make a working code with the requirement given by mofoworking it better to post here rather than go to waste...
Just trying to help...
@mofoworking
try it out...
Best Regards,
gladxml
i forgot about that part of my question :)
Thanks very much
I was hoping that you will be generous to give some points...
just kidding...
Glad to be of help...
Regards,
gladxml






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
but how do you split points up?
No dont do that it is unfair to apollois...
It is also improper since you already accepted an answer...
If you dont have that much point it is ok...
Good luck on your project...
Regards,
gladxml
ASP
--
Questions
--
Followers
Top Experts
Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.