Re: [jQuery] Erasing contents of a form

2006-08-21 Thread Bruce MacKay
Thanks for the responses Kenton,Matt. I've only been partially successful however in progressing these solutions. I have tried your solutions: The .val is partially successful in that it erases a form element's content, but only by inserting a blank space in its place (e.g. $(#sComment).val(

Re: [jQuery] Erasing contents of a form

2006-08-21 Thread Bruce MacKay
Thanks Ashutosh /Dave. Yes Dave, I did mean #commentsFormZ - sorry. Neither of these solutions fired, so perhaps there must be something else in my code screwing things up. The site is at http://www.callas.org.nz/e_books.asp?id=showpID=1cID=156 - feel free to add a comment! Cheers, Bruce

[jQuery] Erasing contents of a form

2006-08-20 Thread Bruce MacKay
Hi folks, I use the function below to send user comments to a database and get refreshed on the current page - no problems. However, I cannot seem to erase the contents of the comments form (id=NewCommentZ) for subsequent use - the text area and text input elements remain populated with the

Re: [jQuery] Erasing contents of a form

2006-08-20 Thread kenton.simpson
use .val() on form elements or you could reset the form Bruce MacKay wrote: Hi folks, I use the function below to send user comments to a database and get refreshed on the current page - no problems. However, I cannot seem to erase the contents of the comments form (id=NewCommentZ)

Re: [jQuery] Erasing contents of a form

2006-08-20 Thread Matt Stith
Or do $(formElement).reset(); , that would reset the form to its original state.On 8/20/06, Bruce MacKay [EMAIL PROTECTED] wrote: Hi folks, I use the function below to send user comments to a database and get refreshed on the current page - no problems. However, I cannot seem to erase the