row span in a tables data cell (form layout) - Forum - Rollbase - Progress Community

row span in a tables data cell (form layout)

 Forum

row span in a tables data cell (form layout)

  • Shoule the whole html snippet be in double quotes?

    $('#rbi_F_contactRole').parent().html("'<div>'+

    '</div>'");???

  • According to this:

    http://api.jquery.com/html/

    .html()

    This method does not accept any arguments. ???

  • Have tried this, no error but the control doesnt show:

    <script>

    $('#rbi_F_contactRole').parent().html("<div><td class='rbs_rightLabel3' id='rbi_L_contactRole'>Contact Role</td><td class='rbs_leftDataCol3' id='rbi_F_contactRole' rowspan='6'><select name='contactRole' tabindex='29' multiple='true' size='6'><option value='11565'>Billing & Finance</option><option value='11566'>Send Licences</option><option value='11567'>Send Leads To</option><option value='11568'>Secure Portal Admin</option><option value='11569'>TC Technician</option><option value='11570'>Beta Tester</option></select></td></div>");

    </script>

  • This will help understanding Javascrip Strings www.w3schools.com/.../js_strings.asp

    Your last snippet is fine just that it is being called before the said content is ever loaded on the page. To execute stuff after the complete page has loaded use jquery onready function.

    <script>

    $(document).ready(function() {

    $('#rbi_F_contactRole').parent().html("<div><td class='rbs_rightLabel3' id='rbi_L_contactRole'>Contact Role</td><td class='rbs_leftDataCol3' id='rbi_F_contactRole' rowspan='6'><select name='contactRole' tabindex='29' multiple='true' size='6'><option value='11565'>Billing & Finance</option><option value='11566'>Send Licences</option><option value='11567'>Send Leads To</option><option value='11568'>Secure Portal Admin</option><option value='11569'>TC Technician</option><option value='11570'>Beta Tester</option></select></td></div>");

    });

    </script>

  • I have tried it and nothing is showing up bud

  • I have tried it for a list of checkboxes but also does not show up:

    <script>

    $(document).ready(function() {

    $('#rbi_L_contactRole').parent().html("<div><td class='rbs_rightLabel3' id='rbi_L_communication'>Communication</td><td class='rbs_leftDataCol3' id='rbi_F_communication'><input type='checkbox' name='communication_44418' id='communication_44418' checked='true'> <label style='cursor:pointer' for='communication_44418'>Do Not Solicit</label>  <input type='checkbox' name='communication_44419' id='communication_44419' checked='true'> <label style='cursor:pointer' for='communication_44419'>Do Not Email</label>  <input type='checkbox' name='communication_44420' id='communication_44420' checked='true'> <label style='cursor:pointer' for='communication_44420'>Do Not Mail</label>  <input type='checkbox' name='communication_44421' id='communication_44421'> <label style='cursor:pointer' for='communication_44421'>Do Not Call</label>  </div>");

    });

    </script>

  • Hello,

    This should work. You need to replace the parent element by using the replaceWith method in JQuery.

    <div id="divElem"></div>

    <script>
      $(document).ready(function(){
        var divElem = "<td class='rbs_rightLabel3' id='rbi_L_contactRole'>Contact Role</td><td class='rbs_leftDataCol3' id='rbi_F_contactRole' rowspan='6'><select name='contactRole' tabindex='29' multiple='true' size='6'><option value='11565'>Billing & Finance</option><option value='11566'>Send Licences</option><option value='11567'>Send Leads To</option><option value='11568'>Secure Portal Admin</option><option value='11569'>TC Technician</option><option value='11570'>Beta Tester</option></select></td>";
        $('#divElem').parent().replaceWith(divElem);
      });
    </script>

    Hope this helps.

    Thank you,

    Gian

  • Worked like a charm thank you, nice one.

  • I have managed to get the control to appear correctly but the data wont bind?

  • Hello,

    Can you provide a screenshot so that we may have an Idea on what is happening?

    Thank you,
    Gian