[jQuery] Re: How do you restore the defaultValue of select element after a change event?

2008-03-24 Thread Jason Huck
Oh, duh. You mean whatever their last selection was prior to the change. Sorry! Can you pop each successful update into a global var, and then restore from that when they cancel? - jason On Mar 24, 6:22 pm, Ashley <[EMAIL PROTECTED]> wrote: > On Mar 24, 3:08 pm, Jason Huck <[EMAIL PROTECTED]>

[jQuery] Re: How do you restore the defaultValue of select element after a change event?

2008-03-24 Thread Ashley
On Mar 24, 3:08 pm, Jason Huck <[EMAIL PROTECTED]> wrote: > If your first element has an empty value attribute, you can > do this: > > $('select').change(function(){ > alert($(this).val()); > $(this).val(''); > > }); I wish. The XHTML is written dynamically and the selected eleme

[jQuery] Re: How do you restore the defaultValue of select element after a change event?

2008-03-24 Thread Jason Huck
If your first element has an empty value attribute, you can do this: $('select').change(function(){ alert($(this).val()); $(this).val(''); }); - jason On Mar 24, 2:16 pm, Ashley <[EMAIL PROTECTED]> wrote: > I have a select which pops a modal (with blockUI) input when a sele