ah this is what update does.
function update()
{
this.undoDisabled = false;
this.updateCropping();
this.updateZoom();
}
I don't need it to do this, all i want is when the users clicks on enabletaupe that the hidden form field att_wrapcolor value gets updated.
Sorry i'm not very good at this!
OK. Bearing in mind JavaScripts limitations with object-orientation. As I understand it,
att_effect and
att_wrapcolour should both be properties of the object
selectedproduct,
update(), updateCropping(), updateZoom() are methods of the object
selectedproduct. On clicking a link/button they should both be updated using the code as you've described in
enableGreyscale() and
enableTaupe().
You mention hidden fields on the form, what are their names? Is it
-
<input type="hidden" name="att_effect" value="" />
-
or
-
input type="hidden" name="att_effect_[ordernum]" value="" />
-
Have you seen any code that looks anything (not exactly) like
- document.formname.att_effect.value = ...