mofoworking
asked on
This is all about multiple dropdown boxes and onchange procedure
hey guys,
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", "Lancer"," 3S");
oModelSeries.Add("Evolutio n","Evolut ion","3S") ;
//5 series
oModelSeries.Add("Getz","G etz","5S") ;
oModelSeries.Add("Sonata", "Sonata"," 5S");
oModelSeries.Add("Grandure ","Grandur e","5S");
//7 series
oModelSeries.Add("Camry"," Camry","7S ");
oModelSeries.Add("Corolla" ,"Corolla" ,"7S");
oModelSeries.Add("Avalon", "Avalon"," 7S");
//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", "2 Door Auto","Getz");
oSeriesColors.Add("14000", "2 Door Manual","Getz");
oSeriesColors.Add("20000", "2 Door Auto","Sonata");
oSeriesColors.Add("19000", "2 Door Manual","Sonata");
oSeriesColors.Add("18500", "2 Door Auto","Sonata");
oSeriesColors.Add("17500", "2 Door Manual","Sonata");
oSeriesColors.Add("30000", "2 Door Auto","Grandure");
oSeriesColors.Add("29000", "2 Door Manual","Grandure");
</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> </td>
</tr>
</table></td>
</tr><tr>
<td> <table>
<tr>
<td colspan=6><font face=arial size=2><b>Example :&n bsp; select
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 p;</b></fo nt></td>
<td align=left valign=top><SELECT name=model id=model onchange="UpdateSelect('se ries','car form',this .options[t his.select edIndex].v alue,oMode lSeries);" >
<option value="">[Select a Model]</option>
<option value="7S">Toyota</option>
<option value="5S">Hyundai</option >
<option value="3S">Mitsubishi</opt ion>
</select></td>
<td align=right bgcolor=lightgrey><font face=arial size=2><b>Series :&nb sp;</b></f ont><br>
<a href="javascript:clearOpti ons('serie s','carfor m');"><fon t face=arial size=2><b>Clear
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 rcolors',' carform',t his.option s[this.sel ectedIndex ].value,oS eriesColor s);">
<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) :& nbsp;</b>< /font><br>
<a href="javascript:clearOpti ons('carco lors','car form');">< font face=arial size=2><b>Clear
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>
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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can you clear the text box before it adds a new entry?
instead off just adding to it?
otherwise it is a great solution
instead off just adding to it?
otherwise it is a great solution
ASKER
never mid i worked it out
thanks very much for your help
thanks very much for your help
mofoworking,
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 8 Series","3S");
oModelSeries.Add("318s","3 18s Series","3S");
oModelSeries.Add("320","32 0 Series","3S");
oModelSeries.Add("325","32 5 Series","3S");
oModelSeries.Add("328","32 8 Series","3S");
oModelSeries.Add("M3","M3 Series","3S");
//5 series
oModelSeries.Add("520","52 0 Series","5S");
oModelSeries.Add("525","52 5 Series","5S");
oModelSeries.Add("535","53 5 Series","5S");
oModelSeries.Add("540","54 0 Series","5S");
oModelSeries.Add("M5","M5" ,"5S");
//7 series
oModelSeries.Add("735","73 5 Series","7S");
oModelSeries.Add("740","74 0 Series","7S");
oModelSeries.Add("750","75 0 Series","7S");
//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" ,"Red color","318");
oSeriesColors.Add("318navy ","Navy color","318");
oSeriesColors.Add("318silv er","Silve r color","318");
oSeriesColors.Add("318swhi te","Red color","318s");
oSeriesColors.Add("318snav y","Navy color","318s");
oSeriesColors.Add("320silv er","silve r color","320");
oSeriesColors.Add("325whit e","white color","325");
oSeriesColors.Add("325red" ,"red color","325");
oSeriesColors.Add("328navy ","Navy color","328");
oSeriesColors.Add("328blac k","Black color","328");
oSeriesColors.Add("m3yello w","Yellow color","M3");
oSeriesColors.Add("m3gray" ,"Gray color","M3");
//5 series
oSeriesColors.Add("520red" ,"Red color","520");
oSeriesColors.Add("520navy ","Navy color","520");
oSeriesColors.Add("520silv er","Silve r color","520");
oSeriesColors.Add("525whit e","Red color","525");
oSeriesColors.Add("525navy ","Navy color","525");
oSeriesColors.Add("535silv er","Silve r color","535");
oSeriesColors.Add("535whit e","white color","535");
oSeriesColors.Add("535red" ,"red color","535");
oSeriesColors.Add("540navy ","Navy color","540");
oSeriesColors.Add("m5yello w","Yellow color","M5");
oSeriesColors.Add("m5gray" ,"Gray color","M5");
//7 series
oSeriesColors.Add("735red" ,"Red color","735");
oSeriesColors.Add("735navy ","Navy color","735");
oSeriesColors.Add("740silv er","Silve r color","740");
oSeriesColors.Add("740whit e","Red color","740");
oSeriesColors.Add("740navy ","Navy color","740");
oSeriesColors.Add("750silv er","Silve r color","750");
function checkifempty(){
document.carform.textfield .value = document.carform.model.val ue + ' ' +document.carform.series.v alue + ' ' + document.carform.carcolors .value
}
</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 p;</b></fo nt></td>
<td align=left valign=top>
<SELECT name=model id=model onchange="UpdateSelect('se ries','car form',this .options[t his.select edIndex].v alue,oMode lSeries);" >
<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 sp;</b></f ont><br>
<a href="javascript:clearOpti ons('serie s','carfor m');"><fon t face=arial size=2><b>Clear
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 rcolors',' carform',t his.option s[this.sel ectedIndex ].value,oS eriesColor s);">
<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) :& nbsp;</b>< /font><br>
<a href="javascript:clearOpti ons('carco lors','car form');">< font face=arial size=2><b>Clear
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>
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>
mofoworking,
>>>>>>>
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 8 Series","3S");
oModelSeries.Add("318s","3 18s Series","3S");
oModelSeries.Add("320","32 0 Series","3S");
oModelSeries.Add("325","32 5 Series","3S");
oModelSeries.Add("328","32 8 Series","3S");
oModelSeries.Add("M3","M3 Series","3S");
//5 series
oModelSeries.Add("520","52 0 Series","5S");
oModelSeries.Add("525","52 5 Series","5S");
oModelSeries.Add("535","53 5 Series","5S");
oModelSeries.Add("540","54 0 Series","5S");
oModelSeries.Add("M5","M5" ,"5S");
//7 series
oModelSeries.Add("735","73 5 Series","7S");
oModelSeries.Add("740","74 0 Series","7S");
oModelSeries.Add("750","75 0 Series","7S");
//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" ,"Red color","318");
oSeriesColors.Add("318navy ","Navy color","318");
oSeriesColors.Add("318silv er","Silve r color","318");
oSeriesColors.Add("318swhi te","Red color","318s");
oSeriesColors.Add("318snav y","Navy color","318s");
oSeriesColors.Add("320silv er","silve r color","320");
oSeriesColors.Add("325whit e","white color","325");
oSeriesColors.Add("325red" ,"red color","325");
oSeriesColors.Add("328navy ","Navy color","328");
oSeriesColors.Add("328blac k","Black color","328");
oSeriesColors.Add("m3yello w","Yellow color","M3");
oSeriesColors.Add("m3gray" ,"Gray color","M3");
//5 series
oSeriesColors.Add("520red" ,"Red color","520");
oSeriesColors.Add("520navy ","Navy color","520");
oSeriesColors.Add("520silv er","Silve r color","520");
oSeriesColors.Add("525whit e","Red color","525");
oSeriesColors.Add("525navy ","Navy color","525");
oSeriesColors.Add("535silv er","Silve r color","535");
oSeriesColors.Add("535whit e","white color","535");
oSeriesColors.Add("535red" ,"red color","535");
oSeriesColors.Add("540navy ","Navy color","540");
oSeriesColors.Add("m5yello w","Yellow color","M5");
oSeriesColors.Add("m5gray" ,"Gray color","M5");
//7 series
oSeriesColors.Add("735red" ,"Red color","735");
oSeriesColors.Add("735navy ","Navy color","735");
oSeriesColors.Add("740silv er","Silve r color","740");
oSeriesColors.Add("740whit e","Red color","740");
oSeriesColors.Add("740navy ","Navy color","740");
oSeriesColors.Add("750silv er","Silve r color","750");
function show(id) {
//if (ns4) document.layers[id].visibi lity = "show"
//else if (ie4)
document.all[id].style.vis ibility = "visible"
}
function hide(id) {
//if (ns4) document.layers[id].visibi lity = "hide"
//else if (ie4)
document.all[id].style.vis ibility = "hidden"
}
function textempty(){
document.carform.textfield .value = ""
}
function checkifempty(){
show('divshowhide');
document.carform.textfield .value = document.carform.model.val ue + ' ' +document.carform.series.v alue + ' ' + document.carform.carcolors .value
}
</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 p;</b></fo nt></td>
<td align=left valign=top>
<SELECT name=model id=model onchange="UpdateSelect('se ries','car form',this .options[t his.select edIndex].v alue,oMode lSeries);h ide('divsh owhide');t extempty() ;">
<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 sp;</b></f ont><br>
<a href="javascript:clearOpti ons('serie s','carfor m');"><fon t face=arial size=2><b>Clear
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 rcolors',' carform',t his.option s[this.sel ectedIndex ].value,oS eriesColor s);hide('d ivshowhide ');textemp ty();">
<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) :& nbsp;</b>< /font><br>
<a href="javascript:clearOpti ons('carco lors','car form');">< font face=arial size=2><b>Clear
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;; left: 17px; top: 104px; width: 120px; height: 28px">
<input type="text" name="textfield">
@</div>
</td>
</tr>
</form>
</table>
</BODY>
</HTML>
HAppy programming...
>>>>>>>
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...
gladxml,
Have you noticed that this question has been answered and is closed?
Best Regards,
>apollois<
Have you noticed that this question has been answered and is closed?
Best Regards,
>apollois<
@apollois,
<<<
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
<<<
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
ASKER
You are a champ
i forgot about that part of my question :)
Thanks very much
i forgot about that part of my question :)
Thanks very much
mofoworking,
I was hoping that you will be generous to give some points...
just kidding...
Glad to be of help...
Regards,
gladxml
I was hoping that you will be generous to give some points...
just kidding...
Glad to be of help...
Regards,
gladxml
ASKER
sorry about that
but how do you split points up?
but how do you split points up?
mofoworking,
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
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
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<