Updating JS to work with iPhone: populating a text field from a drop-down

I found the following code to populate a text field based on a selection. But it is not working on the iPhone device. I’m using PhoneGap, building my pages with HTML, CSS, JS. What needs to change to make this compatible?

<script type="text/Javascript">
window.onload=function() {
if (document.getElementById) {
document.getElementById("SOneSurface").onchange=function() { switchme(this); }
function switchme(SNewSel) {
var ind = SNewSel.selectedIndex;
var txt = document.getElementById('SOneSurfaceLoad');
switch (ind) {
case 1:
txt.value = "Flat";
case 2:
txt.value = "Somewhat Flat";  
case 3:
txt.value = "Bumpy";  
case 4:
txt.value = "Very Bumpy";  
case 5:
txt.value = "see notes";  
            <!-- Start of first page -->
            <div data-role="page" id="SOnetrackCond" data-theme="b" data-add-back-btn="true">               
                <div data-role="header">
                    <h1>Setup 1</h1>
                </div><!-- /header -->
                <div data-role="content"><form name="form1c">
                                    <ul data-role="listview" data-dividertheme="b">
                        <li data-role="list-divider">Track Conditions</li>
                            <select size="1" name="SOneSurface" id="SOneSurface">
                                <option value="">Surface</option>
                                <option value="Flat">Flat smooth</option>
                                <option value="Somewhat Flat">Somewhat Flat</option>
                                <option value="Bumpy">Bumpy</option>
                                <option value="Very Bumpy">Very Bumpy</option>
                                <option value="see notes">see notes</option>
                        <input type="text" name="SOneSurfaceLoad" placeholder="Do not type here" class="loadField" data-role="none"></li>

Quite possibly it is the wrong code anyway. I want the text field to populate immediately upon the selection being made.

I found an answer. This is solved.