0

How do I get the results of this to be on the same line? I would like it to say From Atlanta + away New York on the same line. It is currently putting the second selection on the next line. Sorry for the dumb question. I'm new to this.

<html>
<body>

<select name='teamfrom' onChange='showSelectedfrom(this.value)'>
    <option value='Atlanta'>Atlanta</option>
    <option value='New York'>New York</option>
</select>

<select name='teamto' onChange='showSelectedto(this.value)'>
    <option value='Atlanta'>Atlanta</option>
    <option value='New York'>New York</option>
</select>

<div id='teamfrom'></div><div id='teamto'></div>


<script type="text/javascript">
    function showSelectedfrom(val){
        document.getElementById
('teamfrom').innerHTML = "From " 
+ val;
    }
    function showSelectedto(val){
        document.getElementById
('teamto').innerHTML = " + away " 
+ val;
    }

</script>
</body>
</html>

Edited by diafol: applied code tags

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by fobos
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.