I have a custom List with a dropdown list field called "Rate" with two
values = Thumbs Up and Thumbs Down.
I have another icon field (picture field).
When the user selects Thumbs Up, I would like to set the image Like.jpg to
the icon field and when the user selects Thumbs Down, I would like to set
the image disLike.jpg to the Icon field.
This is what I'm doing on the NewForm.aspx using SharePoint Designer.
<script>
bunch of code.......
if (theType.value=="Thumbs Up")
{
alert("TU");
document.forms("ContentForm").elements("ows:icon:url").value = "http://
-------/ImageLibrary/Like.jpg";
document.forms("ContentForm").elements("ows:icon:desc").value = "Thumbs
Up";
}
else if (theType.value=="Thumbs Down")
{
alert("TD");
document.forms("ContentForm").elements("ows:icon:url").value = "http://
---------/ImageLibrary/disLike.jpg";
document.forms("ContentForm").elements("ows:icon:desc").value = "Thumbs
Down";
}
</script>
I'm successfully able to alert 'TU' and 'TD' on NewForm.aspx, but can't set
the image value on saving the form. This code will work in SharePoint 2003
but not working in MOSS.