Personal tools

User:Serkan/test5: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
mNo edit summary
mNo edit summary
Line 102: Line 102:
                 } else if (splitted[i].toString().indexOf("Swissregulon") >= 0) {
                 } else if (splitted[i].toString().indexOf("Swissregulon") >= 0) {


                     return_val = '<a href=\"/resource_browser/'+ splitted[i] + '\"><img src=\"/resource_browser/seqlogos/' + splitted[i].split(":")[1] + '.png"  class="ImageBorder"  alt="' + splitted[i] + '">' + '</a>' + return_val;
                     return_val = '<a href=\"/resource_browser/'+ splitted[i] + '\"><img src=\"/resource_browser/seqlogos/' + replaceAll(splitted[i].split(":")[1]," ","_") + '.png"  class="ImageBorder"  alt="' + splitted[i] + '">' + '</a>' + return_val;
                 }
                 }


Line 112: Line 112:
             } else if (splitted[0].toString().indexOf("Swissregulon") >= 0) {
             } else if (splitted[0].toString().indexOf("Swissregulon") >= 0) {


                 return_val = '<a href=\"/resource_browser/' + splitted[0] + '\"><img src=\"/resource_browser/seqlogos/' + splitted[0].split(":")[1] + '.png"  class="ImageBorder"  alt="' + splitted[0] + '">' + '</a>' ;
                 return_val = '<a href=\"/resource_browser/' + splitted[0] + '\"><img src=\"/resource_browser/seqlogos/' + replaceAll(splitted[0].split(":")[1]," ","_") + '.png"  class="ImageBorder"  alt="' + splitted[0] + '">' + '</a>' ;
             }
             }


Line 136: Line 136:


} );
} );
function replaceAll(find, replace, str) {
  return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);
}
unction escapeRegExp(string) {
    return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}
</script>
</script>
<span id="export_tool"></span>
<span id="export_tool"></span>

Revision as of 10:54, 18 April 2014



Mouse transcription factors