Can anyone spot the bug??? Because I've been trying for three days and can't. The purpose of the script is to take the " out of a sentence and replace it with ".
<script>
function runfunction () {
var thestring = self.test.box.value;
var thestring_array = thestring.split('"');
var theresult
var counterlimit = thestring_array.length
var counter = 0
var box_value = ""
var theresult_counter
do {
theresult_counter = 0
do {
theresult[theresult_counter] = thestring_array[counter] + """;
counter++
theresult_counter++
}
while (counter < counterlimit && theresult_counter < 2)
box_value = box_value + "document.writeln(\"" + theresult[0] + theresult[1] + "\");";
}
while (counter < counterlimit)
self.test.box2.value = box_value
}
</script>
<script>
function runfunction () {
var thestring = self.test.box.value;
var thestring_array = thestring.split('"');
var theresult
var counterlimit = thestring_array.length
var counter = 0
var box_value = ""
var theresult_counter
do {
theresult_counter = 0
do {
theresult[theresult_counter] = thestring_array[counter] + """;
counter++
theresult_counter++
}
while (counter < counterlimit && theresult_counter < 2)
box_value = box_value + "document.writeln(\"" + theresult[0] + theresult[1] + "\");";
}
while (counter < counterlimit)
self.test.box2.value = box_value
}
</script>