HI,
How does one make a button or link for a form so that it clears
text entered in a form?
Redice
HI,
How does one make a button or link for a form so that it clears
text entered in a form?
Redice
<input type="reset"/>
Make sure it's inside the desired <form>.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
thanks twey
how bout when wanting to apply it to an image?
Maybe I could upload the page for you to have a look, and also let me know how I could apply a mail form script to my form! Is that OK?
Redice
HTML Code:<form id="form1"> <input type="text"/> <input type="text"/> <input type="password"/> <input type="text"/> </form> <img src="image.jpg" onclick="document.getElementById('form1').reset();"/>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
the code works well. thnx
but when i put the cursor over the image in the browser
the cursor doesnt change. Isnt it ment to?
redice
No. If you want it to, you can use:
<img src="image.jpg" onclick="document.getElementById('form1').reset();" style="cursor:pointer"/>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
how do i make text and image as submit button? For the form?
You can add onclick="document.getElementById('form1').reset();" to any element: <span>, <img>, <p>, <a>...
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Hi all,
Back at this!! I got the clear to work fine.
how do i get the submit/send button to work?
Exactly the same as reset, but you use submit() instead of reset().
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks