Mercurial > repos > davidvanzessen > report_clonality_igg
view script.js @ 5:99834201251f draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 10 Mar 2014 11:06:17 -0400 |
parents | |
children | 18ac92a69ef1 |
line wrap: on
line source
function compareAdd(id){ var img = document.createElement('img'); img.setAttribute('src', 'VD_' + id + '.png'); var td = document.createElement('td'); td.setAttribute('id', "comparison_vd_" + id); td.appendChild(img) document.getElementById('comparison_table_vd').appendChild(td); img = document.createElement('img'); img.setAttribute('src', 'VJ_' + id + '.png'); td = document.createElement('td'); td.setAttribute('id', "comparison_vj_" + id); td.appendChild(img) document.getElementById('comparison_table_vj').appendChild(td); img = document.createElement('img'); img.setAttribute('src', 'DJ_' + id + '.png'); td = document.createElement('td'); td.setAttribute('id', "comparison_dj_" + id); td.appendChild(img) document.getElementById('comparison_table_dj').appendChild(td); document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareRemove('" + id + "')"); } function compareRemove(id){ document.getElementById("comparison_vd_" + id).remove() document.getElementById("comparison_vj_" + id).remove() document.getElementById("comparison_dj_" + id).remove() document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareAdd('" + id + "')"); }