Código HTML:
Ver original<!-- TWO STEPS TO INSTALL NO DUPLICATES:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<SCRIPT LANGUAGE="JavaScript"> <!-- Web Site: http://213.177.134.20 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var OptLstTxt = new Array;
var OptLstVal = new Array;
var OptLen = 0;
function NoDupl(SelObjFrom, SelObjTo) {
var OldToVal = SelObjTo.options[SelObjTo.selectedIndex].value;
if (OptLen == 0) {
OptLen = SelObjFrom.length;
for (var i = 1; i < OptLen; i++) {
OptLstTxt[i] = SelObjFrom.options[i].text;
OptLstVal[i] = SelObjFrom.options[i].value;
}
}
var j = 1;
for (var i = 1; i < OptLen; i++) {
if (OptLstVal[i] != SelObjFrom.options[SelObjFrom.selectedIndex].value) {
if (j == SelObjTo.length) {
SelObjTo.options[j] = new Option(OptLstTxt[i]);
}
else {
SelObjTo.options[j].text = OptLstTxt[i];
}
SelObjTo.options[j].value = OptLstVal[i];
if (OptLstVal[i] == OldToVal) {
SelObjTo.selectedIndex = j;
}
j++;
}
}
if (SelObjTo.length > j)
SelObjTo.options[(SelObjTo.length - 1)] = null;
}
// End -->
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<form method="POST" name="MForm"> Try to select the same color:
<select name="Color_1" onChange="NoDupl(this,document.MForm.Color_2)"> <option selected value=''>Select your first prefered color
</option> <select name="Color_2" onChange="NoDupl(this,document.MForm.Color_1)"> <option selected value=''>Select Second Prefered color
</option>
<font face="arial, helvetica" size"-2">Free JavaScripts provided
<br> by
<a href="http://javascriptsource.com">The JavaScript Source
</a></font>
<!-- Script Size: 2.34 KB -->
---------
este si te puede venir al pelo...