Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Set the field value on a Custom list NewForm.aspx

  Asked By: Betsy Molina         Date: Jan 09, 2010      Category: Sharepoint      Views: 1128
 

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.

Tagged:                  

 

1 Answer Found

 
Answer #1       Answered By: Kacey Russo          Answered On: Jan 09, 2010       

Are you certain those fields are the same names in 2007?

 
Didn't find what you were looking for? Find more on Set the field value on a Custom list NewForm.aspx Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].