[Pas2js] fieldset (or other tag) change the disabled attribute
Luca Olivetti
luca at ventoso.org
Tue Sep 13 17:30:49 CEST 2022
El 13/9/22 a les 17:19, Luca Olivetti ha escrit:
> El 13/9/22 a les 17:15, Michael Van Canneyt ha escrit:
>
>>> I tried that, and it doesn't work.
>>> I want to disable the disabled, neither setting it to '0' or to
>>> 'false' works (i.e. the form is still disabled).
>>> The other way round works though (i.e. I don't put the disabled in
>>> the html and set it to '1' in code).
>>> Strange.
>>
>> not strange. The attribute/property is there (regardless of the
>> value), or it is not, you must use undefined
>> if you wish to remove it:
>>
>> El['disabled']:=undefined;
>
> silwebclient.lpr(88,31) Error: Incompatible types: got "JSValue"
> expected "String"
But if I specify
El.Properties['disabled']:=undefined;
it compiles and it works.
That's because I used a TJSHTMLElement which redefines Attrs as the
default property. Confusing.
Bye
--
Luca
More information about the Pas2js
mailing list