hello daniweb web developers i am beginner with programing and i want to know how to make this one..if i select a item for example CA on <select box> how to put a confirmation message that will be put in the <div> tag? i'm hoping you could help me sir..regards -aizel

<script type='text/javascript'>
function madeSelection(elem, helperMsg){
    if(elem.value == "Please Choose"){
        alert(helperMsg);
        elem.focus();
        return false;
    }else{
        return true;
    }
}
</script>
<form>
Selection: <select id='selection'>
<option>Please Choose</option>
<option>CA</option>
<option>WI</option>
<option>XX</option>
</select>
<div id"confirmation"></div>
<input type='button' 
    onclick="madeSelection(document.getElementById('selection'), 'Please Choose Something')"
    value='Check Field' />
</form>

i haven't seen search lol
case close

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.