0

I'm almost there in achieving out what I have set out to do, please see the following code:

http://jsfiddle.net/6xPye/2/

The only thing I wish to change is, instead of creating a tags dropdown based on the first drop-down's selected value I wish to generate a text box instead.

The reason for this is that there are simply too many options for it to be a dropdown so I'm hoping to make it a textbox and then hopefully add some auto-complete functionality to it once it is working.

An example of some tags that I would like to generate a textbox for rather than a drop-down would be all of the escherproperties - e.g. escherpropertyname, escherpropertynumber etc.

Any help and suggestions are much appreciated.

Regards,

Martin

1 Answer 1

1

I would do the following: 1st - add a unique ID tag to each tag heading and textbox tag headings...this way you can easily reference the exact or tags you want.

2nd - use the .change() jquery function like so

$("select#dropbox1").change(function(){
  switch($(this).val()){
     case 'escherpropertyname': case 'escherpropertynumber': 
           $("select#dropbox2, $select#dropbox3, $select#dropbox4").css({display:'none'});
           $("input#textbox1, input#textbox2").css({display:'block'});
     break;
   };
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.