Hey Guys, see this thread http://forums.digitalpoint.com/showthread.php?t=137759 A friend of mine told me about creating a combobox using JavaScript and div's or something like that, Does anybody about made code for this feature I need? Thanks a lot for the answers
Hi! A combo box is a select element. Like all elements this can be created through scripting by using DOM functions. // Create the element: var combo_box = document.createElement('select'); // Set some properties: combo_box.name = 'something'; // Add some choices: var choice = document.createElement('option'); choice.value = 'option1'; choice.appendChild(document.createTextNode('Option 1'); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = 'option2'; choice.appendChild(document.createTextNode('Option 2'); combo_box.appendChild(choice); /* Add it to the page. Normally you would get a reference to a form element, and add it to that. Directly within the body, a select element is meaningless. */ document.body.appendChild(combo_box); Code (markup): Hope that gets you started. - P