I've got a List in SP2010 and am trying to update a value with a little javascript and I'm not sure what I ought to be doing.
I've set the default List Form WebPart to false, and added a custom list form.
I've got a FormField in my NewForm.aspx file that looks like this in Sharepoint Designer:
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Polygon" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Polygon')}"/>
<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="Polygon" ControlMode="New"/>
</td>
But I'm not sure what the id of the object ought to be, I gave a simple try with:
$("#ff2{$Pos}").Value=res;
but that doesn't seem to be right.
I'm not finding it so easy to analyse the source that comes in my browser, it seems possible that the field gets an Id like:
ctl00$m$g_999175ee_0976_4d22_ad09_003284566eb9$ff2_1$ctl00$ctl00$TextField_spSave
which just seems crazy.
Am I going about this wrongly? Am I looking at this wrongly?