var ie=document.all var ns6=document.getElementById && !document.all showCopyCommand = "select code" if(ie){ showCopyCommand = "select & copy code" } function selectText1(id){ if(document.getElementById(id).value == ""){ // alert("There is nothing to select.\n\nPlease Create Script First!"); return; } document.getElementById(id).focus(); document.getElementById(id).select(); var copiedtext="" var tempstore="" if(ie){ tempstore=copiedtext document.execCommand("Copy") copiedtext=window.clipboardData.getData("Text"); } NSmsg="Code has been \"highlighted\" press\nControl + C to copy to your clipboard." IEmsg = "Selected data is now\ncopied to your clipboard.\n\n\Just paste data accordingly.\n" if(ie){alert(IEmsg);} if(ns6){alert(NSmsg);} }