HighDots Forums  

Re: Clear Button

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: Clear Button in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SamMan
 
Posts: n/a

Default Re: Clear Button - 07-13-2003 , 07:48 PM






You need to create a JavaScript function that will set the value of the
textfield or whatever to null, or "". It can be as simple as this...

function clearText() {
document.form1.textfield.value = "";
}

In your button tag, call the js function using the onClick event....
onClick="clearText()"

Remember, form1 is the name of your form (can be anything) and textfield is
the name of your textfield (again, can be anything).

Hope this helps,
Sam

"davaze" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Can someone tell me how to make a Button in a form to clear a specific
textfield or whatever within that form.
I need a button to clear formfields, not to reset a complete form.

Thnx,
Dave.






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.