From: Asad Habib [mailto:ahabib@engin.umich.edu]
Hello. I tried using <button> elements instead of <input> elements but they don't work for form submission. Do you have any idea why? I am using IE 5.2 on Mac OS X Panther and the following is my code:
<button type="submit" name="edit_data" value="Save Changes">Save Changes</button>
edit_data is the name of a DTML method and is the action of the form. However, when I click on this button I get a 'Key Error' informing me that edit_data is a nonexistent object or variable. If I use an <input> element instead, everything works fine. Input elements do not achieve what I want though.
That's not what you asked about - you asked about buttons. Anyway, it works as expected for me. Try this simple example, which displays exactly what data the form sends, and if you need it to do something else, you will have to explain more clearly what you want. <html> <head> <title>Button Test</title> </head> <body> <form> <input name='data' value='this is a test' size='30'><br> <input type='submit' name='sub1' value='Try it (INPUT)'> <button type='submit' name='button1' value='b1'>Try it (BUTTON1)</button> <button type='submit' name='button2' value='b2'>Try it (BUTTON2)</button></form> <dtml-var "REQUEST.form"> </body> </html> Cheers, Tom P
participants (1)
-
Passin, Tom