Ok my first post here so sorry if i mess something up.
I have to edit a page that uses some javascript and not sure really.
At the moment a user clicks on a button saying "black and white" and this shows an image on the page in black and white, it also update a hidden form field with the value "BW".
This works fine.
here is the code for that.
<!-- this shows the user the button to click -->
<div class="effect" onClick="enable Greyscale()">
<script language="javas cript">
greyscaleContro l('images/bandw.gif','ima ges/bandw.gif', true);
</script>
<span class="editboxa cttitle"><commo nweb:resource resid="EFFECTS_ BANDW"/></span>
</div>
<!-- end-->
<!-- the js funtion -->
function enableGreyscale ()
{
selectedproduct .att_effect = "BW";
selectedproduct .update();
draw();
}
<!-- end-->
So what i need to do now is give the users the functionality to choose a border colour.
This is not to redraw any image on the page, all that happens is a user clicks on a colour and i want it to update a hidden form field with the value of the colour.
This is what i tried with my limited knowledge.
<!-- this shows the user the button to click -->
<img src="images/canvas_colours/images/canvas_taupe_sm all.gif" style="cursor:p ointer" alt="Taupe" name="taupe_sma ll" id="taupe_small " onClick="enable Taupe();">
<!-- end -->
<!-- the js function -->
function enableTaupe()
{
selectedproduct .att_wrapcolour = "Taupe";
selectedproduct .update();
draw();
}
<!-- end -->
This doesn't work, the value in the form field just says value=""
Any help would be great!
I have to edit a page that uses some javascript and not sure really.
At the moment a user clicks on a button saying "black and white" and this shows an image on the page in black and white, it also update a hidden form field with the value "BW".
This works fine.
here is the code for that.
<!-- this shows the user the button to click -->
<div class="effect" onClick="enable Greyscale()">
<script language="javas cript">
greyscaleContro l('images/bandw.gif','ima ges/bandw.gif', true);
</script>
<span class="editboxa cttitle"><commo nweb:resource resid="EFFECTS_ BANDW"/></span>
</div>
<!-- end-->
<!-- the js funtion -->
function enableGreyscale ()
{
selectedproduct .att_effect = "BW";
selectedproduct .update();
draw();
}
<!-- end-->
So what i need to do now is give the users the functionality to choose a border colour.
This is not to redraw any image on the page, all that happens is a user clicks on a colour and i want it to update a hidden form field with the value of the colour.
This is what i tried with my limited knowledge.
<!-- this shows the user the button to click -->
<img src="images/canvas_colours/images/canvas_taupe_sm all.gif" style="cursor:p ointer" alt="Taupe" name="taupe_sma ll" id="taupe_small " onClick="enable Taupe();">
<!-- end -->
<!-- the js function -->
function enableTaupe()
{
selectedproduct .att_wrapcolour = "Taupe";
selectedproduct .update();
draw();
}
<!-- end -->
This doesn't work, the value in the form field just says value=""
Any help would be great!
Comment