| Author |
Message |
|
|
Post subject: JavaScript: Suppressing errors re unknown properties
Posted: Oct 02, 2007 - 06:18 PM
|
|
Registered Member


Joined: May 07, 2007
Posts: 31
|
|
In my Ajax apps, I have this JavaScript function in somefile.js:
| Code: | function getRequestObject() {
if (window.ActiveXObject) {
return(new ActiveXObject("Microsoft.XMLHTTP"));
} else if (window.XMLHttpRequest) {
return(new XMLHttpRequest());
} else {
return(null);
}
} |
The second and fourth lines get flagged by MyEclipse as warnings, with the error messages "ActiveXObject declaration is not found" and "XMLHttpRequest declaration is not found", respectively. Similarly, I have a line with "document.getElementById(region).innerHTML = blah", and it says "innerHTML declaration not found".
Should I be writing the code a different way? If not, how can I suppress that type of warning in MyEclipse?
BTW, for my Ajax projects, I just do New --> Project --> MyEclipse --> Java Enterprise Projects --> Web project (the same as I do for regular servlets/JSP, Struts, or JSF). Should I be doing something extra to get additional Ajax support?
Thanks! |
_________________
Marty Hall
Customized training: Java, servlets, JSP, Struts, JSF/MyFaces, Facelets, Ajax, GWT
|
| |
|
|
|
 |
|
|
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Posted: Oct 04, 2007 - 06:57 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Marty,
You are doing the right things, unfortunately the JS validator isn't quite as robust as it needs to be at the moment to understand all this. What you can do is either ignore the warnings or right-click on the files in question and go down to MyEclipse and exclude those files from validation. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Posted: Oct 04, 2007 - 07:07 PM
|
|
Registered Member


Joined: May 07, 2007
Posts: 31
|
|
|
|
|
 |
|
|
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Posted: Oct 05, 2007 - 04:34 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Unfortunately not that specific of filtering yet, sorry. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Posted: Feb 19, 2008 - 08:18 PM
|
|
Joined: Feb 19, 2008
Posts: 1
|
|
Any progress on either suppressing the "xxx declaration is not found" message or being able to tell it what variable/attribute names to ignore or accept? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 19, 2008 - 09:20 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
not for 6.5, 7.0 is looking like it will have a major update to JS editor though. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 25, 2009 - 03:09 PM
|
|
Registered Member

Joined: Oct 16, 2009
Posts: 5
|
|
| support-rkalla wrote: | | not for 6.5, 7.0 is looking like it will have a major update to JS editor though. |
I am having the same problem, as described in martyhall's post. I am using Vrsion 7.5.
When do you plan to implement the major update to JS as mentioned above?
mazarata |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 26, 2009 - 10:12 AM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
mazarata,
This is a management decision. I would request you to post a feature request here - http://www.myeclipseide.com/PNphpBB2-viewforum-f-7.html
What is the editor you are using the view the JSP? Have you tried - MyEclipse Visual JSP Designer?
Temporarily, you can try by doing the following - right click on the file, from the context menu click on MyEclipse > exclude from Validation. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Validation
Posted: Dec 08, 2009 - 12:33 AM
|
|
Registered Member

Joined: Dec 08, 2009
Posts: 1
|
|
So this is still a problem and we either show warnings which shouldn't be there or have to ignore an entire file from validation or is something finally available??? Neither of those sound like acceptable answers. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Validation
Posted: Dec 08, 2009 - 08:29 AM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
marc2912,
I would recommend you to download ME 8.0, this includes a lot of improvements on our JS editor. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: Validation
Posted: Apr 18, 2010 - 10:53 PM
|
|
Veteran Member


Joined: Mar 07, 2005
Posts: 19
|
|
I am using 8.0 with, I believe, all the available 8.5 updates and my situation is still that described above. Did I miss doing something? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Validation
Posted: Apr 19, 2010 - 07:40 AM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
bcichowlas,
I will escalate this issue to our dev team members to investigate this further. In the meantime, you can ignore the said warnings. To exclude the javascript file from validation, right click on the file > MyEclipse > Exclude from validation.
Sorry for the inconvenience. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|