Hi Can anyone offer any help to fix the following hack or an alternative methord. I just need some select options and then to display those options live/dynamically. <javascript code> <script id="ivnS1"> window.fCopyToClipboard = function(rSource1){ rSource1.select() if(window.clipboardData){ var r=clipboardData.setData('Text',rSource1.value); return 1; } else return 0 } window.fSample1 = function(rSource1){ rSource1.select() o=document.getElementById('sample1') if(o) o.innerHTML = rSource1.value } window.fCopyToClipboard = function(rSource2){ rSource2.select() if(window.clipboardData){ var r=clipboardData.setData('Text',rSource2.value); return 1; } else return 0 } window.fSample2 = function(rSource2){ rSource2.select() o=document.getElementById('sample2') if(o) o.innerHTML = rSource2.value } if(document && document.getElementById){ sObj = document.getElementById('ivnS1'); tObj = document.getElementById('ivnT1'); if(sObj && sObj.innerHTML && tObj) tObj.innerHTML = '<xmp>'+sObj.innerHTML+'</xmp>' } </script> Code (markup): </javascript code> <html code> <table> <tr> <td align="center" id="sample1">(waiting for input)</td> <td align="center" id="sample2">(waiting for input)</td> </tr> <tr> <td> <select onchange="if(window.fSample1) window.fSample1(this)" onpaste="if(window.fSample1) window.fSample1(this)"> <option>Internet Explorer</option> <option>Netscape</option> <option>Opera</option> </select> </td> <td> <select onchange="if(window.fSample2) window.fSample2(this)" onpaste="if(window.fSample2) window.fSample2(this)"> <option>Google</option> <option>Yahoo</option> <option>Bing</option> </select> </td> </tr> </table> HTML: </html code> Many thanks for any assistance offered, stuart
SOLVED thanks - found this <script language="javascript"> function changeText(idElement){ if(idElement==1){ document.getElementById('element').innerHTML ='Google'; } else if(idElement==2){ document.getElementById('element').innerHTML ='Yahoo'; }else if(idElement==3){ document.getElementById('element').innerHTML ='Bing'; } } </script> <div id="element">Google</div> <select> <option onClick="javascript:changeText(1)">Google</option> <option onClick="javascript:changeText(2)">Yahoo</option> <option onClick="javascript:changeText(3)">Bing</option> </select> Code (markup):