Need Onchange events for SharePoint:FormFields -


i need call javascript function when sharepoint:formfield has changed. provide client side feedback there selection.

i need add on new content type form, in visual studio project. sharepoint:formfield doesn't appear have onchange event, normal asp controls.
looked @ valuechanged event, looks read only.

any suggestions or appreciated

solution found:

i resolved problem google , webborg.blogspot.com/2008/04/… , mysplist.blogspot.com/2010/03/…. add javascript should inline , after following sharepoint:formfield

<table cellpadding="0" cellspacing="0" id="onetidlistform" style="width:100%"> <tr> <td width="400px"  valign="top"  class="ms-formbody">      <sharepoint:formfield runat="server" id="mygender" controlmode="new" fieldname="mygender" />     <sharepoint:fielddescription runat="server"  id="field_mygender_description"  fieldname="my gender" controlmode="new"  />  </td> </tr> </table>   <script type="text/javascript">  function getfield(fieldid)  {      var doctags = document.all;     (var i=0; < doctags.length; i++) {         if (doctags[i].title == fieldid) {               return doctags[i]          }      }  }   function displaymessage() {     if (getfield('my gender').value == 'male') {      alert('hello manhood');      } }  getfield('my gender').onchange = function() {displaymessage()};  </script> 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -