I get my user to choose a value from a drop down and then when Iprint the form, the value, not the select box appears.
To do this I use :
So the value of the select box is printed.
My problem is now I want to do it with the select box and two text fields, but it is not working. Is it not possible to do the above, but to more than one field at a time ?
eg :
This is what I'm trying to use but none of the figures are printing.
To do this I use :
Code:
<span class="noPrint"><select style="width:150px;" name="Company">
//// My select box is here
</select></span><div id="select"></div>
<script>
function PrintWin()
{
document.getElementById("select").innerHTML= document.form.Company.options[document.form.Company.selectedIndex].value
window.print()
}
</script>
So the value of the select box is printed.
My problem is now I want to do it with the select box and two text fields, but it is not working. Is it not possible to do the above, but to more than one field at a time ?
eg :
Code:
<span class="noPrint"><select style="width:150px;" name="Company">
//// My select box is here
</select></span><div id="select"></div>
<span class="noPrint"><textarea cols="30" rows="5" name="Address" id="Address">Please fill in address here</textarea></span><div id="Address"></div>
<input type="text" name="Dear" style="width:200"></span><div id="Dear"></div>
<script>
function PrintWin()
{
document.getElementById("select").innerHTML= document.form.Company.options[document.form.Company.selectedIndex].value
document.getElementById("Address").innerHTML= document.form.Address.value
document.getElementById("Dear").innerHTML= document.form.Dear.value
window.print()
}
</script>
This is what I'm trying to use but none of the figures are printing.