Hello,
Does anyone know why this isn't working? (on the last line of the script - 'out.innerHTML').
I presumed that I could add 'table' 'tr' and 'td' tags because it was working when I just had a radio button in the script.
I'm going to try combining innerhtml tags at some stage as I have a feeling the way I've written it might be overkill.
thanks
ian
Does anyone know why this isn't working? (on the last line of the script - 'out.innerHTML').
I presumed that I could add 'table' 'tr' and 'td' tags because it was working when I just had a radio button in the script.
I'm going to try combining innerhtml tags at some stage as I have a feeling the way I've written it might be overkill.
thanks
ian
Code:
<script type="text/javascript">
function copy() {
var sel = document.getElementById("problem2");
var text = sel.options[sel.selectedIndex].value;
var sel2 = document.getElementById("product2");
var text2 = sel2.options[sel2.selectedIndex].value;
var sel3 = document.getElementById("process2");
var text3 = sel3.options[sel3.selectedIndex].value;
var out = document.getElementById("output");
out.innerHTML += "<table>" + "<tr>" + "<td>" + "<input type=\"radio\" name=\"ouputradio\">" "<\/td>" + "<td>" + text + "<\/td>" + "<td>" + text2 + "<\/td>" + "<td>" + text3 + "<\/td>" + "<td>" + "<\/td>" + "<\/tr>"+ "<\/table>";
}
</script>