<html>
<body>
Please VIEW it as an HTML doc for clarity, thanks.<P>
Goal:
Display dynamic options.
Description:
<pre>
First, display 4 (1,2,3,4) options upon any "order" column
selection; then present the remaining 3 options,
which could be 2,3,4 if first selection is 1
or 1,3,4 if first selection is 2
or ...;
same pattern for the rest.
</pre>
<table>
<tr>
<td colspan="4" align="right"><font color="Green"><b>Column Order</b></font></td>
<td colspan="4" align="right"><font color="Green"><b>Column Order</b></font></td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">1</font>
CUSTOMERID: <input type="checkbox" name="col" value=http://www.webdeveloper.com/forum/archive/index.php/"CustomerID">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_CustomerID" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<td align="right" valign="top"><font color="blue">2</font>
COMPANYNAME: <input type="checkbox" name="col" value="CompanyName">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_CompanyName" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">3</font>
CONTACTNAME: <input type="checkbox" name="col" value="ContactName">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_ContactName" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<td align="right" valign="top"><font color="blue">4</font>
CONTACTTITLE: <input type="checkbox" name="col" value="ContactTitle">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_ContactTitle" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">5</font>
ADDRESS: <input type="checkbox" name="col" value="Address">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_Address" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<!-- check col alias -->
<td align="right" valign="top"><font color="blue">6</font>
CITY: <input type="checkbox" name="col" value="City">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_City" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
</table>
<pre>
psuedo code:
// option length
preset opLen = document.form[0].{opCol?}.options[0].length = 4;
// option selection list
preset opSelList ='';
upon each selection
set opLen = opLen - 1;
set opSelList = append(opSelList,current selection);
for (var i = 0; i < opLen; i++) {
if (document.form[0].{opCol?}.options.selected NOT IN opSelList) {
document.write('<option>'+i);
}
// js code to be embeded inside FORM select element?
</pre>
<p>
Thanks.
</body>
</html>
Also, how to set "HTML code (to) ON"? I don't see any option for that.
<body>
Please VIEW it as an HTML doc for clarity, thanks.<P>
Goal:
Display dynamic options.
Description:
<pre>
First, display 4 (1,2,3,4) options upon any "order" column
selection; then present the remaining 3 options,
which could be 2,3,4 if first selection is 1
or 1,3,4 if first selection is 2
or ...;
same pattern for the rest.
</pre>
<table>
<tr>
<td colspan="4" align="right"><font color="Green"><b>Column Order</b></font></td>
<td colspan="4" align="right"><font color="Green"><b>Column Order</b></font></td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">1</font>
CUSTOMERID: <input type="checkbox" name="col" value=http://www.webdeveloper.com/forum/archive/index.php/"CustomerID">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_CustomerID" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<td align="right" valign="top"><font color="blue">2</font>
COMPANYNAME: <input type="checkbox" name="col" value="CompanyName">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_CompanyName" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">3</font>
CONTACTNAME: <input type="checkbox" name="col" value="ContactName">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_ContactName" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<td align="right" valign="top"><font color="blue">4</font>
CONTACTTITLE: <input type="checkbox" name="col" value="ContactTitle">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_ContactTitle" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
<tr>
<td align="right" valign="top"><font color="blue">5</font>
ADDRESS: <input type="checkbox" name="col" value="Address">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_Address" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
<!-- check col alias -->
<td align="right" valign="top"><font color="blue">6</font>
CITY: <input type="checkbox" name="col" value="City">
<br>
</td>
<td colspan="3" align="right" valign="top">
<select name="colOrder_City" onChange='ops(this)'>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">
<option>1
<option>2
<option>3
<option>4
</select>
</td>
</tr>
</table>
<pre>
psuedo code:
// option length
preset opLen = document.form[0].{opCol?}.options[0].length = 4;
// option selection list
preset opSelList ='';
upon each selection
set opLen = opLen - 1;
set opSelList = append(opSelList,current selection);
for (var i = 0; i < opLen; i++) {
if (document.form[0].{opCol?}.options.selected NOT IN opSelList) {
document.write('<option>'+i);
}
// js code to be embeded inside FORM select element?
</pre>
<p>
Thanks.
</body>
</html>
Also, how to set "HTML code (to) ON"? I don't see any option for that.