I want to translate binary to text and back in a form, I could not find any examples on google or something.
I wanted to make something like this http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp
I found this code while searching but I cant get it working :#
<script type="text/javascript">
//<![CDATA[
function txt2bin()
{
url = 'http://services.webestools.com/txt2bin/txt2bin.js?str='+encodeURIComponent($('ftxt').value);
var js_effets=document.createElement("script");
js_effets.setAttribute("type", "text/javascript");
js_effets.setAttribute("src", url);
document.getElementsByTagName("script")[0].parentNode.insertBefore(js_effets,document.getElementsByTagName("script")[0]);
$('frm').style.display='block';
}
function bin2txt()
{
url = 'http://services.webestools.com/txt2bin/bin2txt.js?str='+encodeURIComponent($('fbin').value);
var js_effets=document.createElement("script");
js_effets.setAttribute("type", "text/javascript");
js_effets.setAttribute("src", url);
document.getElementsByTagName("script")[0].parentNode.insertBefore(js_effets,document.getElementsByTagName("script")[0]);
$('frm').style.display='block';
}
//]]>
</script>