[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

On change enable a menu field

Hallo experts.
I have two menu :
<select name="Hersteller_ID" id="Hersteller_ID">
                            <option value="">select</option>
                            <cfoutput query="query1">
                              <option value="#text_ID#">#text#</option>
                            </cfoutput>
                          </select>
                   
 <select name="Modell_ID" id="Modell_ID" disabled="disabled">
                            <option value="">select</option>
<cfoutput query="query2">
                            <option value="#Text2_ID#">#Text2#</option>
                          </cfoutput>
                          </select>
I want to enable the second when the first changes (onchange function)
regards panos
(i use coldfusion 8)
0
Panos
Asked:
Panos
  • 2
1 Solution
 
meverestCommented:

<select name="Hersteller_ID"  id="Hersteller_ID"onChange="javascript:javascript:getElementById('Modell_ID').disabled=false">
    <option value="">select</option>
    <cfoutput query="query1">
        <option value="#text_ID#">#text#</option>
    </cfoutput>
</select>
                   
<select name="Modell_ID" id="Modell_ID" disabled="disabled">
    <option value="">select</option>
    <cfoutput query="query2">
        <option value="#Text2_ID#">#Text2#</option>
    </cfoutput>
</select>

Open in new window

0
 
PanosAuthor Commented:
Hallo meverest.
a notice!
You have written two times the word javascript!!
onChange="javascript:getElementById('Modell_ID').disabled=false"
Thanks.
regards panos
0
 
meverestCommented:
ah yes - so I did.

it probably won't work if you leave two of them there! ;-)

Cheers.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now