 |
| Javascript General Javascript discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 9th, 2005, 02:32 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
|
|
JavaScript: what is the function of "length" in th
Because the error says "null or not an object".
Code:
<!-- //
conv_tbl = [
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
32, 33,8704, 1513,1505, 37, 83,8717, 65, 79, 8727, 1496, 44,8722, 58, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 46, 59, 60, 61, 62, 63,
64, 1488, 1489, 1510, 1491, 69, 70, 1490, 1492, 73, 74, 1499, 1500, 1502, 1504, 1506,
1508, 81, 1512, 1513, 1514, 85, 1493, 87, 1495, 1497, 90, 91, 92, 93, 94, 95,
63, 97, 66, 1509, 68, 101, 102, 71, 72, 105, 106, 1498, 1500, 1501, 1503, 111,
1507, 1511, 82, 8707, 84, 117, 118, 86, 88, 89, 1494, 123, 124, 125, 126, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 978,8242,8804,8260,8734, 402,9827,9830,9829,9824,8596,8592,8593,8594,8595,
63, 177,8243,8805, 215,8733,8706,8729, 247,8800,8801,8776,8230, 63, 63,8629,
8501,8465,8476,8472,8855,8853,8709,8745,8746,8835,8839,8836,8834,8838,8712,8713,
8736,8711, 174, 169,8482,8719,8730,8901, 172,8743,8744,8660,8656,8657,8658,8659,
9674,9001, 174, 169,8482,8721, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63,9002,8747,8992, 63,8993, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63
];
function convert(mc, unic_textarea)
{
unic = '';
for (i = 0; i < mc.length; i++)
{
tbl_idx = mc.charCodeAt(i);
code = tbl_idx < conv_tbl.length ? conv_tbl[tbl_idx] : 63;
unic = unic + String.fromCharCode(code)
}
unic_textarea.value = unic;
}
function mc2unic()
{
mc = document.conv_form.mc_code.value;
convert(mc, document.conv_form.unic_area);
}
// -->
Learning of our true origins.
I feel sorry:
http://www.infowars.com/articles/wor...eknowledge.htm
Foreknowledge of A Natural Disaster
Washington was aware that a deadly Tidal Wave was building up in the Indian Ocean
|
|

March 9th, 2005, 12:41 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Can you show the form tag and the mc_code element?
--
Joe ( Microsoft MVP - XML)
|
|

March 9th, 2005, 07:17 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Here is the original code in full which includes the HTML4.x textarea that I want to leave out:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Michigan-Claremont Hebrew Encoding to Unicode Converter</title>
<script type="text/javascript" language="JavaScript1.3">
<!-- //
conv_tbl = [
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
32, 33,8704, 1513,1505, 37, 83,8717, 65, 79, 8727, 1496, 44,8722, 58, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 46, 59, 60, 61, 62, 63,
64, 1488, 1489, 1510, 1491, 69, 70, 1490, 1492, 73, 74, 1499, 1500, 1502, 1504, 1506,
1508, 81, 1512, 1513, 1514, 85, 1493, 87, 1495, 1497, 90, 91, 92, 93, 94, 95,
63, 97, 66, 1509, 68, 101, 102, 71, 72, 105, 106, 1498, 1500, 1501, 1503, 111,
1507, 1511, 82, 8707, 84, 117, 118, 86, 88, 89, 1494, 123, 124, 125, 126, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 978,8242,8804,8260,8734, 402,9827,9830,9829,9824,8596,8592,8593,8594,8595,
63, 177,8243,8805, 215,8733,8706,8729, 247,8800,8801,8776,8230, 63, 63,8629,
8501,8465,8476,8472,8855,8853,8709,8745,8746,8835,8839,8836,8834,8838,8712,8713,
8736,8711, 174, 169,8482,8719,8730,8901, 172,8743,8744,8660,8656,8657,8658,8659,
9674,9001, 174, 169,8482,8721, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63,9002,8747,8992, 63,8993, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63
];
function convert(mc, unic_textarea, html_textarea)
{
unic = '';
html = '';
for (i = 0; i < mc.length; i++)
{
tbl_idx = mc.charCodeAt(i);
code = tbl_idx < conv_tbl.length ? conv_tbl[tbl_idx] : 63;
unic = unic + String.fromCharCode(code);
html = html + '#' + code + ';'
}
unic_textarea.value = unic;
html_textarea.value = html;
}
function mc2unic()
{
mc = document.conv_form.mc_code.value;
convert(mc, document.conv_form.unic_area, document.conv_form.html_area);
}
// -->
</script>
<%'<script type='text/javascript' language="JavaScript1.3" src='javascript/aleph.js'></script>%>
<style type="TEXT/CSS">
<!--
.onLoad {
color:khaki;
background:black;
scrollbar-base-color:darkgrey;
}
.onMouseOver {
color:khaki;
background:black;
scrollbar-base-color:grey;
}
.onMouseOut {
color:khaki;
background:black;
scrollbar-base-color:grey;
}
//-->
</style>
</head>
<body bgcolor="black" text="khaki" link="yellow" vlink="white" alink="orange">
</div>
</title>
<br>
<center>
<h1>Michigan-Claremont Hebrew Encoding to Unicode Converter</h1>
</center>
<form name="conv_form">
<center>
<table border=0 cellspacing=10 cellpadding=10 align=center>
<tr>
<td>
<center><b>Codes:</b></center><br>
<table border = 1 align=top cellspacing=2 cellpadding=2>
<tr>
<td align=center>
A = #1488<br>
</td>
<td align=center>
M = #1502<br>
</td>
</tr>
<tr>
<td align=center>
B = #1489<br>
</td>
<td align=center>
n = #1504<br>
</td>
</tr>
<tr>
<td align=center>
G = #1490<br>
</td>
<td align=center>
N = #1503<br>
</td>
</tr>
<tr>
<td align=center>
D = #1491<br>
</td>
<td align=center>
$ = #1505<br>
</td>
</tr>
<tr>
<td align=center>
H = #1492<br>
</td>
<td align=center>
O = #1506<br>
</td>
</tr>
<tr>
<td align=center>
V = #1493<br>
</td>
<td align=center>
p = #1508<br>
</td>
</tr>
<tr>
<td align=center>
Z = #1494<br>
</td>
<td align=center>
P = #1507<br>
</td>
</tr>
<tr>
<td align=center>
X = #1495<br>
</td>
<td align=center>
c = #1510<br>
</td>
</tr>
<tr>
<td align=center>
+ = #1496<br>
</td>
<td align=center>
C = #1509<br>
</td>
</tr>
<tr>
<td align=center>
Y = #1497<br>
</td>
<td align=center>
q = #1511<br>
</td>
</tr>
<tr>
<td align=center>
k = #1499<br>
</td>
<td align=center>
R = #82<br>
</td>
</tr>
<tr>
<td align=center>
K = #1498<br>
</td>
<td align=center>
S = #1513<br>
</td>
</tr>
<tr>
<td align=center>
L = #1500<br>
</td>
<td align=center>
T = #1514<br>
</td>
</tr>
<tr>
<td align=center>
m = #1501<br>
</td>
<td align=center>
. = #58<br>
</td>
</tr>
</table>
</td>
<td>
<h4>MC Codes</h4>
<textarea name="mc_code" rows="3" cols="64"
class="onLoad" onmouseover="this.className='onMouseOver'"
onmouseout="this.className='onMouseOut'"></textarea> <br>
<h4>Unicode</h4>
<textarea name="unic_area" rows="3" cols="64"
class="onLoad" onmouseover="this.className='onMouseOver'"
onmouseout="this.className='onMouseOut'"></textarea> <br>
<h4>HTML4.x</h4>
<textarea name="html_area" rows="3" cols="64"
class="onLoad" onmouseover="this.className='onMouseOver'"
onmouseout="this.className='onMouseOut'"></textarea> <br>
<br>
<center> <input name="convert" type="button" value="Convert" onclick="mc2unic()"></center>
</center>
</form>
</td>
</table>
</body>
</html>
This isn't the page with the error though. WHat I was trying to do was to place them next to each record but I think the was a confusion. But I think I should leave that problem for later.
Learning of our true origins.
I feel sorry:
http://www.infowars.com/articles/wor...eknowledge.htm
Foreknowledge of A Natural Disaster
Washington was aware that a deadly Tidal Wave was building up in the Indian Ocean
|
|
 |