Change DIV on select

I need to change an input in a cfform from A to B when a selection is made from a select above the inputs. Input A has an autosuggest list that works for Authors and this is the default. I have to add a list for Owners that is input B. So when someone goes to the site and selects Owners from the dropdown select box the div containing input B replaces input A. I can use javascript or jQuery 1.6
Who is Participating?
Anuradha GoliConnect With a Mentor Systems Development / Support SpecialistCommented:

Here you go. (online demo )


<select id="select">
    <option value="1">111</option>
    <option value="2">222</option>
    <option value="3">333</option>

<div id="warning" style="display:none">NO!!!</div>
<div id="message"  >Message!!!</div>
jQuery Code;

$(function() {
        if ($(this).val() == "2") {
        } else {

Open in new window

WAlexxeAuthor Commented:
Worked like a charm!! Thanks!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.