> > // reset select
> > $('#form_id select').each(function(){
> > $(this).find('option:first').attr('selected', 'selected').parent('select');
> > });
Yuck, what a waste of energy
document.getElementById("form_id").selectedIndex = 0;
would do the same exact thing
Thanks to both!
Mike
On Dec 1, 12:22 am, HS8KIC wrote:
> you can do this.
> // reset input type text
> $('#form_id input[type=text]').each(function(){ this.value = ''; });
> // reset textarea
> $(''#form_id textarea').each(function(){ this.value = ''; });
> // reset select
> $('#form_id select')
2 matches
Mail list logo