Javascript Issue with place text into text area correctly
<p>Well edited this with the something tht looks much better thanks to Thomas W for a good example. I only altered it slightly but now seems to be working flawlessly. And Thomas now that ive learned and understand a new way to do something i wont be doing it the other way again. :) gonna change the code in the clearbox(form) soon too.</p>

<p>Thanks</p>

<pre><code>&lt;HTML&gt;
&lt;HEAD&gt; 
&lt;SCRIPT LANGUAGE="JavaScript"&gt;
window.onload = function(){
        windows1.style.fontWeight = "bold";
        windows1.style.fontSize = "12pt";
        changetabs(1)
        }
var split_text;
var urls_1;
var numbercount=0;
var totals;
var check_time;
var wait = 0;
var itemCounter = 0;
var tabs=1;
var tabspicked=1;

    function addto_boxes(form) {
        split_text = document.getElementById("text_to_split").value;
        urls_1 = split_text.split(" ", 100000);
        totals = urls_1.length-1;
        var boxNum = 1;
        var x=0;
        while (x &lt;= totals -1 ) {
            var box = document.getElementById( "input_box"+boxNum);
            box.value = box.value + urls_1[x] + " ";
            boxNum += 1;
            if (boxNum &gt; tabspicked) boxNum = 1;
            x++;
            clearbox(this.form) 
        }
    }


    function clearbox(form) {
    document.getElementById("text_to_split").value = "";
    var input_box = document.getElementById("input_box1").value;
    var input_box_2 = document.getElementById("input_box2").value;
    var input_box_3 = document.getElementById("input_box3").value;
    var input_box_4 = document.getElementById("input_box4").value;
    var input_box_5 = document.getElementById("input_box5").value;
    var input_box_6 = document.getElementById("input_box6").value;
    var input_box_7 = document.getElementById("input_box7").value;
    var input_box_8 = document.getElementById("input_box8").value;
    var input_box_9 = document.getElementById("input_box9").value;
    var input_box_10 = document.getElementById("input_box10").value;
    urls = input_box.split(" ", 100000);
    urls2 = input_box_2.split(" ", 100000);
    urls3 = input_box_3.split(" ", 100000);
    urls4 = input_box_4.split(" ", 100000);
    urls5 = input_box_5.split(" ", 100000);
    urls6 = input_box_6.split(" ", 100000);
    urls7 = input_box_7.split(" ", 100000);
    urls8 = input_box_8.split(" ", 100000);
    urls9 = input_box_9.split(" ", 100000);
    urls10 = input_box_10.split(" ", 100000);
    document.getElementById("box1").innerHTML = urls.length-1;
    document.getElementById("box2").innerHTML = urls2.length-1;
    document.getElementById("box3").innerHTML = urls3.length-1;
    document.getElementById("box4").innerHTML = urls4.length-1;
    document.getElementById("box5").innerHTML = urls5.length-1;
    document.getElementById("box6").innerHTML = urls6.length-1;
    document.getElementById("box7").innerHTML = urls7.length-1;
    document.getElementById("box8").innerHTML = urls8.length-1;
    document.getElementById("box9").innerHTML = urls9.length-1;
    document.getElementById("box10").innerHTML = urls10.length-1;
    document.getElementById("displaytotal").innerHTML = urls.length-1 + urls2.length-1 + urls3.length-1 + urls4.length-1 + urls5.length-1 + urls6.length-1 + urls7.length-1 + urls8.length-1 + urls9.length-1 + urls10.length-1;
    }

    function bold_selected_tab(tab_to_bold) {
        document.getElementById("windows1").style.fontSize = "10pt";
        document.getElementById("windows2").style.fontSize = "10pt";
        document.getElementById("windows3").style.fontSize = "10pt";
        document.getElementById("windows4").style.fontSize = "10pt";
        document.getElementById("windows5").style.fontSize = "10pt";
        document.getElementById("windows6").style.fontSize = "10pt";
        document.getElementById("windows7").style.fontSize = "10pt";
        document.getElementById("windows8").style.fontSize = "10pt";
        document.getElementById("windows9").style.fontSize = "10pt";
        document.getElementById("windows10").style.fontSize = "10pt";

        document.getElementById("windows1").style.fontWeight = "normal";
        document.getElementById("windows2").style.fontWeight = "normal";
        document.getElementById("windows3").style.fontWeight = "normal";
        document.getElementById("windows4").style.fontWeight = "normal";
        document.getElementById("windows5").style.fontWeight = "normal";
        document.getElementById("windows6").style.fontWeight = "normal";
        document.getElementById("windows7").style.fontWeight = "normal";
        document.getElementById("windows8").style.fontWeight = "normal";
        document.getElementById("windows9").style.fontWeight = "normal";
        document.getElementById("windows10").style.fontWeight = "normal";
        tab_to_bold.style.fontWeight = "bold";
        tab_to_bold.style.fontSize = "12pt";
    }

    function changetabs(tabs) {
        document.getElementById("tabesselected").innerHTML = tabs;
        tabspicked = tabs;
    }


&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
Select Number of tab to use. Tabs selected &lt;b&gt;&lt;span style="font-size:12pt" id="tabesselected"&gt;&lt;/span&gt;&lt;br&gt;&lt;/b&gt;
&lt;input type="button" id="windows1" style="height: 24px; width: 72px" value="Tabs: 1" onclick="changetabs(1);bold_selected_tab(windows1);" /&gt;&amp;#160;
&lt;input type="button"id="windows2" style="height: 24px; width: 72px" value="Tabs: 2" onclick="changetabs(2);bold_selected_tab(windows2);" /&gt;&amp;#160;
&lt;input type="button"id="windows3" style="height: 24px; width: 72px" value="Tabs: 3" onclick="changetabs(3);bold_selected_tab(windows3);" /&gt;&amp;#160;
&lt;input type="button"id="windows4" style="height: 24px; width: 72px" value="Tabs: 4" onclick="changetabs(4);bold_selected_tab(windows4);" /&gt;&amp;#160;
&lt;input type="button"id="windows5" style="height: 24px; width: 72px" value="Tabs: 5" onclick="changetabs(5);bold_selected_tab(windows5);" /&gt;&amp;#160;
&lt;input type="button"id="windows6" style="height: 24px; width: 72px" value="Tabs: 6" onclick="changetabs(6);bold_selected_tab(windows6);" /&gt;&amp;#160;
&lt;input type="button"id="windows7" style="height: 24px; width: 72px" value="Tabs: 7" onclick="changetabs(7);bold_selected_tab(windows7);" /&gt;&amp;#160;
&lt;input type="button"id="windows8" style="height: 24px; width: 72px" value="Tabs: 8" onclick="changetabs(8);bold_selected_tab(windows8);" /&gt;&amp;#160;
&lt;input type="button"id="windows9" style="height: 24px; width: 72px" value="Tabs: 9" onclick="changetabs(9);bold_selected_tab(windows9);" /&gt;&amp;#160;
&lt;input type="button"id="windows10" style="height: 24px; width: 72px" value="Tabs 10" onclick="changetabs(10);bold_selected_tab(windows10);" /&gt;&lt;br&gt;&lt;br&gt;
&lt;input id="Split" type="button" value="Add to boxes" onclick="addto_boxes(this.form);"/&gt;____&lt;input id="clearbutton" type="button" value="Clear" onclick="clearbox(this.form);"/&gt;&lt;Br&gt;&lt;br&gt;
Paste urls into this box and click add to boxes&lt;br&gt;
&lt;textarea NAME="texttosplit" id="text_to_split" VALUE="" rows="4" cols="75"&gt;&lt;/textarea&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;


&lt;FORM NAME="myform" ACTION="" METHOD="GET"&gt;
&lt;textarea NAME="inputbox" id="input_box1" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox2" id="input_box2" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox3" id="input_box3" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox4" id="input_box4" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox5" id="input_box5" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;&lt;br&gt;
&lt;textarea NAME="inputbox6" id="input_box6" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox7" id="input_box7" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox8" id="input_box8" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox9" id="input_box9" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;
&lt;textarea NAME="inputbox10" id="input_box10" VALUE="" rows="2" cols="5"&gt;&lt;/textarea&gt;&lt;br&gt;
&lt;INPUT TYPE="reset"&gt;
&lt;/FORM&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>

<p>Also thanks Thomas because of your example i was also able to change the function bold_selected_tab() to. I think im getting the hang of it. Now if clearbox(form) function to look like the one below.</p>

<pre><code>    function bold_selected_tab(tab_to_bold) {
        var x=1;
        while (x &lt;= 10 ) {
            var box = document.getElementById("windows"+x);
            box.style.fontSize = "10pt ";
            x++;
        }

        var x=1;
        while (x &lt;= 10 ) {
            var box = document.getElementById("windows"+x);
            box.style.fontWeight = "normal";
            x++;
        }

        tab_to_bold.style.fontWeight = "bold";
        tab_to_bold.style.fontSize = "12pt";
    }
</code></pre>
