Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Add option to HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Add option to HTML" Watch "Add option to HTML" New topic
Author

Add option to HTML

David Avrami
Ranch Hand

Joined: Sep 10, 2011
Posts: 30

Hi to all,
i had my javascript to add options,in my HTML i can see them but i can't select them.



any ideas?
David Avrami
Ranch Hand

Joined: Sep 10, 2011
Posts: 30

got It!
mt bad, all working fine..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

It would be good form to point out what you found in case anyone else runs up agains the same situation.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Avrami
Ranch Hand

Joined: Sep 10, 2011
Posts: 30

well i did though about it, but in my case the problem was not in the code..it runs great,
the problem was i have been invoking the method "onchange()=makeOptions(colName)" in every combobox
for some reasons and every time you pick some other option in that same combobox it calls the function again because "onchange" was
invoked therefor the script reloads the options and it seems like you can't pick nothing.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Thanks for posting the followup.

By the way, please read HtmlHasNoComboBox. Using correct terminology is an important part of development.
David Avrami
Ranch Hand

Joined: Sep 10, 2011
Posts: 30

sorry you'r right, it is a Select tag, the id="Combobox".
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Right, but calling it a combo box is not accurate, even if it's only the id. It may seem pedantic but development is all about attention to details.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Add option to HTML
 
Similar Threads
iterate doubt
JSP variable typical problem
Struts 2 and auto population of HTML tables
JSF Issue not getting Values in Backing Bean
Undefined is null or not an object