facebook

XMLHttpRequest ActiveXObject not recognized

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #247759 Reply

    md2281
    Member

    Maybe it’s me but XMLHttpRequest and ActiveXObject are unrecognized and throw compiler warnings, any way around this as I like to keep the warnings dialog empty.

    This is a simple stand alone JS file.

    #247787

    Riyad Kalla
    Member

    Can you paste an example file for us please?

    #248082

    md2281
    Member
    function NodeAsync(url, fields, callback)
    {
        // code for Mozilla, etc.
        NodeXmlHttp = new XMLHttpRequest();
        if (!NodeXmlHttp) { NodeXmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }
        if (NodeXmlHttp)
        {
            NodeXmlHttp = new XMLHttpRequest();
            NodeXmlHttp.onreadystatechange = callback;
            NodeXmlHttp.open("POST",url,true);
            NodeXmlHttp.setrequestheader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); 
            if ( fields && fields.length > 0 )    { NodeXmlHttp.send(fields.join('&')); }
            else                                { NodeXmlHttp.send(null); }
        }    
    }
    #248084

    Riyad Kalla
    Member

    I can’t reproduce this, when I paste this into a flie (test.js) and open it and save it and validate it, no errors or warnings are marked anywhere. If you close the file then right-click on it and do Open With > MyEclipse Javascript Editor, does it work? I wonder if you are using another editor.

    #248141

    rateoty
    Member

    hello,

    I can reproduce it:

    function retrieveUrlForProcess(url,process){
    var stateHandler;
    var req;
    if (window.XMLHttpRequest) { // Non-IE browsers
    req = new XMLHttpRequest();
    isIE=false;
    } else {
    if (window.ActiveXObject) { // IE
    req = new ActiveXObject(“Microsoft.XMLHTTP”);
    }
    }
    ..
    I see 2 warnings:
    XMLHttpRequest declaration is not found
    ActiveXObject declaration is not found

    I’am using the MyEclipse javascript editor.

    regards. Jürgen

    #248147

    Riyad Kalla
    Member

    Ahh got it, I see them now. I’ll report the issue.

    #255572

    mcarr67
    Member

    Any update on this?

    #255573

    Riyad Kalla
    Member

    Warnings are still marked as the JS validator doesn’t know about these objects (yet).

    #255575

    mcarr67
    Member

    Can we switch it to use IE and still debug?

    #255577

    Riyad Kalla
    Member

    No, debugging JS is only done using the internal Web 2.0 Browser. In 5.0 GA this process is going to be streamlined a lot.

    #257750

    David Orriss Jr
    Participant

    @rateoty wrote:

    hello,

    I can reproduce it:

    function retrieveUrlForProcess(url,process){
    var stateHandler;
    var req;
    if (window.XMLHttpRequest) { // Non-IE browsers
    req = new XMLHttpRequest();
    isIE=false;
    } else {
    if (window.ActiveXObject) { // IE
    req = new ActiveXObject(“Microsoft.XMLHTTP”);
    }
    }
    ..
    I see 2 warnings:
    XMLHttpRequest declaration is not found
    ActiveXObject declaration is not found

    I’am using the MyEclipse javascript editor.

    regards. Jürgen

    These warnings still occur in 5.0GA. Is this just going to be “the way it is” with the JavaScript editor in ME? If so, kinda a bummer.. I was looking forward to some codeinsight support on those objects..

    #257753

    Riyad Kalla
    Member

    There is a long way to go with the JS editor and it will improve over time, this definately isn’t “the way it is”, just “the way it was for 5.0 so we could get the 100 or so other features in instead of just the improved JS editor” 🙂

    #257760

    David Orriss Jr
    Participant

    LOL! Fair enough. Thanks for the update, Riyad! 🙂

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: XMLHttpRequest ActiveXObject not recognized

You must be logged in to post in the forum log in