View Full Version : asc2i

06-27-2006, 04:56 PM
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">
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<STYLE type=text/CSS>BODY {
#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

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

<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>

06-28-2006, 12: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