Skip to main content
Inspiring
October 23, 2008
Question

issue with select 2 functions

  • October 23, 2008
  • 1 reply
  • 368 views
I have one issue, While i impletemented the dynamic dependant tuorial of louis and it works, kudos to louis for this:

I want to implement a little advanced feature with it. I also want that

what i want if i select the visual joke, the text input box should and if i select the text , it should hide.

My code is:

<cfselect name="topcat" onchange="populate(this.form)" tabindex="3" tooltip="Select a Category"><!-- This is the category selector that will call the function -->
<option>- Select a Category -</option>
<cfoutput query="getsubcategories" group="maincategoryName">
<option value="#mainID#">#maincategoryName#</option>
</cfoutput>
</cfselect>

<!-- we group the query results by the top level category so that only the top level categories are outputted -->

<cfselect name="subcat" tabindex="4" tooltip="Select a Sub Category">
<option>- Please select a category -</option>
</cfselect>

well what is can i define 21 more function on onchange

one for selecting a dependant dropdown and another for showing hide input box depending on the option value, llike if option value is visual, a text box is shown else hidden.
This topic has been closed for replies.

1 reply

Participating Frequently
November 4, 2008
I'm not sure what you're looking for, but you might try researching two selects, e.g.: http://carehart.org/spry/johnfarrar/two.html