![]() Topic awaiting preservation: SPAN disabled=false not applying (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Perth Western Australia |
![]() msdn.microsoft.com specifies that a SPAN element has no disable attribute. But when you specify disabled=false the span is disabled. (obviously the same occurs when set to true.) code: incorrect:
|
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() The msdn site is correct, the span-tag doesn't have a disable attribute... What do you want to accomplish? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() The "disabled" attribute (which is not a standard attribute) doesn't work by setting it to false or true. Rather, it's one of those attributes which, when included, takes effect, and when not, doesn't take effect. In HTML 4, they're meant to be used like this: |
Nervous Wreck (II) Inmate From: Perth Western Australia |
![]() hmmm. |
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() Why not use the 'display' property? It is standard comilant and works for all browsers. Set it to 'none' to remove the item and to 'block' or 'inline' to display the item. Since it is a standard CSS property it is also easy to manipulate using JavaScript... |
Paranoid (IV) Inmate From: France |
![]() Another option you may take is to display a low opacity image ( or 2x2 dithered image ) above the SPANs you want to disable. Whatever you do, if you don't disable the form fields or links by a magical-non-standard property, you'll have to trap the onfocus events of the children element of the disabled SPANs to prevent advanced user from accessing active elements inside them. |
Nervous Wreck (II) Inmate From: Perth Western Australia |
![]() Thanks, all valid suggestions. There are a million ways to do it, images, display:none etc.... but the 'most' simple method for the current design is to have the disabled property in the HTML tag. Since that is not really suitable (having the effect of always disabling the span) I'll rewrite the logic and find another approach to initializing the spans enabled or disabled. Oh, and not displaying them serves no purpose. I merely want to show they are not able to be used at one moment or another. Also, removing them via no display does not solve the overall logical problems. |
Paranoid (IV) Inmate From: France |
![]() To show that the active elements ( links, form fields ... ) are disabled, you could also decrease the opacity of their parent SPAN. I think your problem would have been a good entry for the |