Hi, Ariel: Thank you very much for your response.. the website was a little delay in my office PC, so I did not find your post earlier:-) :-)
lihao On Jun 11, 5:46 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote: > $('select[name=test]').change(function(){ > window.open( this.value ); > > }); > > http://www.quirksmode.org/js/popup.html > > -- > Ariel Fleslerhttp://flesler.blogspot.com/ > > On 11 jun, 14:35, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hi, folks: > > > I am trying to use select/option to open a new window and whenever I > > click an item from the selection dropdown list... for example, the > > following sample: > > > <select name="test"> > > <option value="/link/to/v1">value-1</option> > > <option value="/link/to/v2">value-2</option> > > <option value="/link/to/v3">value-3</option> > > <option value="/link/to/v4">value-4</option> > > </select> > > > when I select value-3, a new window will be opened, and the content is > > pointed to "http://mysite.com/link/to/v3". just like <a href="/link/to/ > > v3" target="_blank">value-3</a> > > > How to handle this with jQuery? > > > I can do: > > > <script type="text/javascript"> > > $('select[name=test] option').each(function(i) { > > $(this).click(function(){ > > /* how to open a new link $(this).val() */ > > }); > > }); > > </script> > > > many thanks, > > > lihao