PowerMacX
2005.07.04, 09:15 AM
I'm working on a generic, web based (AJAX) form for entering data, but I ran into a problem: By default, I want all fields to be read-only, so the user can browse records without accidentally modifying them. Clicking on a Modify or New button should switch the state of all fields to editable.
So far, normal text fields work just by updating their "readonly" property, but neither combos nor checkboxes seem to respect that setting :mad:. The only way I found to force them to be readonly is by setting their "disabled" property to true, but in many browsers, Firefox for instance, disabled combos have very light gray text, almost unreadable.
Other than "showing" and hiding an invisible layer on top of every combo to prevent clicks, is there an easy way to make this controls read-only?
So far, normal text fields work just by updating their "readonly" property, but neither combos nor checkboxes seem to respect that setting :mad:. The only way I found to force them to be readonly is by setting their "disabled" property to true, but in many browsers, Firefox for instance, disabled combos have very light gray text, almost unreadable.
Other than "showing" and hiding an invisible layer on top of every combo to prevent clicks, is there an easy way to make this controls read-only?