0

Hi

I'm implementing a plug-in that displays 2 select inputs. The behavior should be exactly the same than "project" and "zone" standard input : when I change the selected item of the first select, the second one is updated regarding the new selected item of the first select input.

I added an onchange event on the first select. this event execute this ugly code

options='<option value="V1">V1</option>';   // building new options
options+='<option value="V2">V2</option>';

$("select#idSelectTemp_1").html(options);    // fixing new options

after that, if I have a look to the html code with firebug, I can see something like that :

<select id="idSelectTemp_1" name="P6_ixContact" style="display: none;">
  <option value="V1">V1</option>
  <option value="V2">V2</option>
</select>

So... It works ! well... It should work. In the user interface, the values in the secondary select input have not changed at all... I suspect that I have to call something to make the input field refreshed but I did not find what...

any idea ?

regards Julien

flag

4 Answers

1

Hi Julien- I think what you're seeing is that your select box is being changed by FogBugz javascript into a full FogBugz droplist (notice that it behaves differently than a regular select box). I think all you need to do is: DropListControl.refreshWithin([the parent node of your select element]); Thanks! Brett

link|flag
0

I'm confused because the HTML you wrote above shows that the select element is not visible (display:none). So how are you seeing the element in the first place? Maybe you're adjusting the wrong select.

link|flag
0

Hi

thanks for your answer.

In facts, this html is not generated by me but by Fogbugz api ( by Forms.SelectInput object).

here's a snapshot before the javascript call (it is straight from fogbugz).

 http://qdaemon.free.fr/before.png

the select is "display:none" but something displays.


here's a snapshot after the javascript call.

 http://qdaemon.free.fr/after.png

Changes are not visible in user interface. With the html code, I understand that there's a link beetween the select item and another object for the user interface. this object is not refreshed when changing the select... but maybe i'm totally wrong...


if I remove the "display:none" with firebug, nothing change in the select display :

http://qdaemon.free.fr/remove%20display.png

Julien

link|flag
0

Yes ! Thanks a lot. I will do pretty cool things with that.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.