dimanche 1 juillet 2018

Select Element by part of the name jQuery

I need to check if the checkbox is checked, the thing is the check box has name and id and I can't use them as it is a sharepoint site and both name and id could be changed once a new element introduced to the page. What should I do?

<tr>
    <td nowrap="true" valign="top" width="190px" class="ms-formlabel"><h3 class="ms-standardheader">
    <nobr>All employees in department</nobr>
</h3></td>
    <td valign="top" class="ms-formbody">
    <!-- FieldName="All employees"
         FieldInternalName="All_x0020_employees_x0020_in_x00"
         FieldType="SPFieldBoolean"
      --> 
 <span dir="none">
    <input id="ctl00_m_g_49618ec6_4999_44aa_87e7_6087a1cf4a6f_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_BooleanField" 
    type="checkbox" name="ctl00$m$g_49618ec6_4999_44aa_87e7_6087a1cf4a6f$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$BooleanField" /><br />
</span>
        select employees !

    </td>




Aucun commentaire:

Enregistrer un commentaire