- This topic has 6 replies, 3 voices, and was last updated 15 years, 3 months ago by Aidan Hughes.
-
AuthorPosts
-
Aidan HughesMemberHi.
Since I upgraded to ME 7.5 I’m seeing errors flagged in the right margin against code like this:
<input type="text" value="foo" readonly>
The word “readonly” is underlined with a red wavy line.
However, no error is being shown on the left margin, and there is no error text being displayed when I hover over either the underlined text, or the error in the margin.I’m still using the transitional doctype dtd, so I understand it is still right for me to use readonly as I have above to make the input box readonly – readonly=”true” will not work for transitional html.
Is this error being generated because ME is now expecting me to be writing xtrict XML?
I’ve looked through the editor preferences and can not see how to stop this error being displayed.
The page I’m working on now has about 30 of these errors flagged, and I can not distinguish “real” errors from these ones.
Is there any way to supress these errors, or am I doing something else wrong?
Thanks,
Aidan
support-shaliniMemberAidan,
I could not replicate this at my end.
Can you switch to a new workspace and check if the issue persists.
In case the issue still persists, please send us the file that you are working with. You can send a mail to support@genuitec.com. Please add ATTN: Shalini in the subject and refer to this thread. This will help us reproduce this issue internally.
To change the HTML validation settings you can go to Windows > Preferences > MyEclipse Enterprise Workbench > Validation > HTML. On the right hand panel, you can change the settings under “Attributes”.
Aidan HughesMemberHi Shalini,
I have created a brand new workspace. In that I created a new web project, and then a new jsp.
I added a single input box, saved it, closed it and when I reopened it the readonly attribute was being flagged as an error.
I am, however, getting a text error message when I hover over the word readonly – Attribute “readonly” has no value.
I am also going to email you a screenshot.Thanks,
Aidan.
Aidan HughesMemberI should also have said that I set all settings against Attributes in the Validation>HTML preferences panel to Ignore, so I would not have expected and errors or warnings to be shown against attributes.
Aidan.
support-shaliniMemberAidan,
I have escalated this issue to the dev team.
Brian FernandesModeratorAidan,
We have been able to replicate this internally but our developers have not found a workaround yet. I have this targeted to be fixed in next MyEclipse release.
In the meanwhile, you could try<input type="text" value="foo" readonly="readonly">
AFAIK, this is the recommended way of doing this and I believe it has been supported by most browsers for some time (I tested IE 8 and FF 3.5).
I realize changing all your code is most likely not the solution you were looking for, but I will let you know if we find a workaround or when the bug is fixed.
Sorry for the inconvenience caused.
Aidan HughesMemberHi Brian,
Thanks for looking at this for me.
Yes – I have already tried this and it does work.
However, my understanding is that this is the XHTML construct, and it is the only way to do it in XHTML.
My code (in this case anyway) is older loose transitional HTML.
Not specifically adding the attribute value is therefore still valid, although, not maybe the way I might code it today.
My preference would not be to try and update all my code just now.I have also noticed that when I type in <input>, ME now automatically adds an extra / at the end – i.e. <input/>.
Again, this is the XHMTL way – all tags must be closed.
This will work in pure HTML, but when it is validated by the W3C validator, it is hilighted as a warning and they suggest that using the backslash to close tages like this is avoided in HTML and left to XHTML only.It seems to me that the jsp editor in ME 7.5 has been updated to be more XHTML friendly.
Whilst this is a good idea in itself, I sould have thought that it should work more based on the document DOCTYPE or DTD, or that you could set the validation level in the preferences.
Instead, it seems to be trying to impose XHTML as best practice – but that conflicts when you are woking on older code, when you do not have time commercially to refactor to the latest standard when you are only doing a small modification or fix ! ! !Cheers,
Aidan.
-
AuthorPosts