Ah ok i have now changed it to this.
<script language="javas cript">
function set_value(id, value) {
var box = document.getEle mentById('att_W rapColour_${pro duct.code}');
box.value = value;
}
</script>
And the onclick to this
onclick="set_va lue(Att_WrapCol our_${product.c ode}, 'taupe');"
When viewing the source they both look like this.
<script language="javas cript">
function set_value(id, value) {
var box = document.getEle mentById('Att_W rapColour_4060S INGLECANVAS/0433-006');
box.value = value;
}
</script>
onclick="set_va lue(Att_WrapCol our_4060SINGLEC ANVAS/0433-006, 'taupe');"
When i click on the image i get
Att_WrapColour_ 4060SINGLECANVA S is undefined, it seems to be missing the value after the slash. /0433-006
??
<script language="javas cript">
function set_value(id, value) {
var box = document.getEle mentById('att_W rapColour_${pro duct.code}');
box.value = value;
}
</script>
And the onclick to this
onclick="set_va lue(Att_WrapCol our_${product.c ode}, 'taupe');"
When viewing the source they both look like this.
<script language="javas cript">
function set_value(id, value) {
var box = document.getEle mentById('Att_W rapColour_4060S INGLECANVAS/0433-006');
box.value = value;
}
</script>
onclick="set_va lue(Att_WrapCol our_4060SINGLEC ANVAS/0433-006, 'taupe');"
When i click on the image i get
Att_WrapColour_ 4060SINGLECANVA S is undefined, it seems to be missing the value after the slash. /0433-006
??
Comment