Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

input hidden selected

 <form>
    <select id="dropdown" name="dropdown" onchange="changeHiddenInput(this)">
        <option value="j.hotmail.com">Jens</option>
        <option value="a.hotmail.com">Adam</option>
        <option value="d.homtail.com">Dan</option>
    </select>
    <input type="hidden" name="hiddenInput" id="hiddenInput" value="" />
 </form>

    function changeHiddenInput (objDropDown)
    {
        var objHidden = document.getElementById("hiddenInput");
        objHidden.value = objDropDown.value; 
    }   
 
PREVIOUS NEXT
Tagged: #input #hidden #selected
ADD COMMENT
Topic
Name
7+4 =