Scooby08 Posted December 17, 2008 Share Posted December 17, 2008 Would it be possible to break these dynamically generated options into optgroups?? Say "Group1" and "Group2".. <script> function setOptions(chosen) { var selbox = document.mainform.new_image; selbox.options.length = 0; if (chosen == "/") { selbox.options[selbox.options.length] = new Option('<?=$imgname?>','<?=$image?>'); } if (chosen == "/test/") { selbox.options[selbox.options.length] = new Option('<?=$imgname?>','<?=$image?>'); } } </script> Quote Link to comment Share on other sites More sharing options...
Psycho Posted December 17, 2008 Share Posted December 17, 2008 This page has an example: http://groups.google.co.ke/group/comp.lang.javascript/msg/011abc4a091f62c5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.