B
Brian Glen Palicia
My goal is to accept input from the user into a text box and then
parse the data using split(). The first step is this tiny program to
test the split() function. It runs in IE, but in Mozilla it just
hangs and keeps loading forever. I checked around on the web and in
USENET, but I haven't seen any mention of split() not working in
Mozilla. Thoughts? Thanks in advance.
<HTML>
<HEAD>
</HEAD>
<SCRIPT language="JavaScript">
<!--
function one()
{
var1 = "one, two, three, four"
var2 = var1.split(",")
document.write("var1=" + var1 + "<br>");
document.write("var2 has " + var2.length + " elements:<br>");
for (var i=0; i < var2.length; i++) {
document.write("Array Item #" + i + "=" + var2 + "<br>");
}
}
//-->
</SCRIPT>
<BODY>
<FORM name="oneForm">
<INPUT onclick="javascriptne()" type=button value="Does split() work
in Mozilla?"></INPUT><BR>
</FORM>
</BODY>
</HTML>
parse the data using split(). The first step is this tiny program to
test the split() function. It runs in IE, but in Mozilla it just
hangs and keeps loading forever. I checked around on the web and in
USENET, but I haven't seen any mention of split() not working in
Mozilla. Thoughts? Thanks in advance.
<HTML>
<HEAD>
</HEAD>
<SCRIPT language="JavaScript">
<!--
function one()
{
var1 = "one, two, three, four"
var2 = var1.split(",")
document.write("var1=" + var1 + "<br>");
document.write("var2 has " + var2.length + " elements:<br>");
for (var i=0; i < var2.length; i++) {
document.write("Array Item #" + i + "=" + var2 + "<br>");
}
}
//-->
</SCRIPT>
<BODY>
<FORM name="oneForm">
<INPUT onclick="javascriptne()" type=button value="Does split() work
in Mozilla?"></INPUT><BR>
</FORM>
</BODY>
</HTML>