...

View Full Version : asc2i



Austin12
06-27-2006, 05:56 PM
Hi,
First, my code works good enough for me in InternetExplorer. Firefox handles the span break differently. This is only notes, not intended to be published. So, please help for now with IE.
My code is getting hung up on the button that includes "10k", it does not write anything!?
I am only trying to see what all the characters are available to me.
(uploading .txt if this does not paste well for you)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>asci2</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<STYLE type=text/CSS>BODY {
MARGIN: 2px
}
#chars {
BORDER-RIGHT: green 1px solid; BORDER-TOP: green 1px solid; FONT-SIZE: 10px; BORDER-LEFT: green 1px solid; BORDER-BOTTOM: green 1px solid; FONT-FAMILY: times new roman
}
.bord {
PADDING-RIGHT: 1px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 10px; COLOR: #999999; PADDING-TOP: 1px
}
.cha {
FONT-SIZE: 16px; COLOR: #300030
}
.buts {
FONT-SIZE: 10px; FONT-FAMILY: comic sans ms
}
</STYLE>

<SCRIPT language=JavaScript>
function getChars(L,H){
k='';
for(i=L;i<H;i++){
k+='<span class="bord"><span class="cha">&#'+i+';</span><br> &#38#'+i+';</span>'}
document.getElementById('chars').innerHTML=k;
}
function abc(){
var step=1500;var z='';
for(i=1,k=step;i<30000;i+=step,k+=step){
z+='<button class="buts" onclick="getChars(\''+i+'\',\''+k+'\')">'+((k-step)/1000)+'-'+(k/1000)+'K</button>';}
document.getElementById('buttons').innerHTML=z;
}
</SCRIPT>

<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY onload=abc()>
<DIV id=buttons>&nbsp;</DIV>
<DIV id=chars>&nbsp;</DIV></BODY></HTML>

Mongus
06-28-2006, 01:53 AM
Is there a reason you're converting the numeric values into strings before passing them into getChars? That's what is causing the problem.

This fixes it:

z+='<button class="buts" onclick="getChars('+i+','+k+')">'+((k-step)/1000)+'-'+(k/1000)+'K</button>';}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum