If I hide a text input element with javascript can other javascript functions still access a value entered into it?
===

I am trying to use this function:

    function storagecalc(){
    var thediv=document.forms["boxes"];
    var boxno=thediv.elements["numbofboxes"];
    var howmany =0;    //If the textbox is not blank    */
    if(boxno.value!="")    
    {        
    howmany=parseInt(quantity.value);    
    }
    return howmany;
    document.getElementById('numberprice').innerHTML = "£"+howmany;
    }

To grab a value entered here:

    <form action="" id="boxes">
                                      
    <input type="text" id="numbofboxes" value="" name="boxnumber"/>
                                          
    <button id="smtbxno" onclick="storagecalc">
                                          
    <img src="images/tick.gif" alt="proceed"/>
                                          
    </button>
                                          
    </form>

and display it here:

    <div id="grandtotal">
                              
    <p class="calctitles">
                                  
    Grand Total
                                  
    </p>
                                  
    <p id="numberprice">
                                  
    </p>
                              
    </div>

Nothing is happening when I enter a value into the textbox and click the button, is this because the button also has jQuery that hides itself and the text box upon clicking? 
If not any suggestions for why it won't work?