Line 195: | Line 195: | ||
// The function to write profile | // The function to write profile | ||
function write_profile(index){ | function write_profile(index){ | ||
− | + | // Despite table, use div | |
− | + | var has_course = (profiles[index][3] != null); | |
− | + | var out = '<div class="table">' | |
− | + '< | + | + '<div class="table_left">Name:<br />School:<br />Department:'; |
− | if( | + | if(has_course){ |
− | out += '< | + | out += '<br />Course:'; |
} | } | ||
− | out += '</table>'; | + | out += '</div><!-- /table_left -->'; |
+ | out += '<div class="table_right">' | ||
+ | + profiles[index][0] + '<br />' + profiles[index][1] + '<br />' + profiles[index][2]; | ||
+ | if(has_course){ | ||
+ | out += '<br />' + profiles[index][3]; | ||
+ | } | ||
+ | out += '</div><!-- /table_right --><div class="table_clear"></div><!-- /table_clear --></div><!-- /table -->'; | ||
document.getElementById("member_profile").innerHTML = out; | document.getElementById("member_profile").innerHTML = out; |
Revision as of 08:49, 18 August 2016