OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Fun with the DOM -- setting <button> type
This page's ID:
22214
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I have a form for registering for training classes. 5 fieldsets: class info participant info button bar customer's company info reset and submit buttons The third fieldset -- the button bar -- consists entirely of <button>s. They do many DOM manipulation stuff like allow one user to register many people at the same time (by adding a new participant info fieldset dynamically), etc. Anyway, I only want the button bar to be created if the brower is capable of doing the things the buttons do. So, I create the fieldset with some js&DOM onload. If the client doesn't understand how to use the buttons, it won't understand how to build them in the first place. Wonderful. My problem is, the buttons are created with type='submit' by default. There are two other options, 'reset' and 'button'. I'd like to set the type='button' so I can attach onclick events to do what I want. No can do, my browsers tell me -- type is readonly. Is there a way I can create the buttons with type being button rather than submit? If not, is there another solution? I tried adding onsubmit event, which did the actions I want and always returned false...hoping that would stop the submit action. That didn't work either. Seemed the buttons just ignored the rest of the function and the form ignored the return false and submitted the form anyway. I'm stuck. Any help would be greatly appreciated.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »