http://www.perlmonks.org?node_id=985021


in reply to Re: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
in thread perl scripter error ReferenceError: The variable ActiveXObject has not been declared

If you look at the js, it should not have gone inside the else condition, all this while when it was working, i think the if condition was satisfied. But for some reason it is not going into the if condition today and am really appalled by so little support in perl by the module owners.
if (window.XMLHttpRequest) { req=new XMLHttpRequest(); } else { req=new ActiveXObject("Microsoft.XMLHTTP"); }
In this script, this part holds the key
my $u = new URI 'data:'; $u->media_type('text/html'); $u->data( $h ); $w->get($u);
Is there something to do with media_style, using something else instead of text/html?
  • Comment on Re^2: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by marto (Cardinal) on Aug 02, 2012 at 12:21 UTC

    "But for some reason it is not going into the if condition today and am really appalled by so little support in perl by the module owners."

    Wait, you contacted them about your code not working today and they haven't fixed it for you yet? That's disgraceful! The support contract and maintenance you pay for states that... oh what, forget it. I notice there are zero open bugs listed in the RT queue.

    Consider debugging this yourself rather than being appalled with anyone else, it's a more productive use of effort. If you find a genuine problem consider actually reporting it.

      Dear Marto, i was referring to the module owners (i.e. people who have created these packages and uploaded on cpan). I no way meant i need a quick reply to my query.

        You said:

        "But for some reason it is not going into the if condition today and am really appalled by so little support in perl by the module owners."

        You state that today is the first day you are having problems. So you expect support within the space of a day, Keeping in mind the the module owner/maintainer may yet have no idea you're having problems? What have you done to bring this to their attention? What makes you think it's a problem with their module and not your code or the sites you're interacting with? Why are you appalled? What level of service do you expect or deem acceptable from the module authors? How much are you paying for this support?

        Update: If as you claim this has worked until today, clearly something has change, either your code, or the data.

Re^3: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by ww (Archbishop) on Aug 02, 2012 at 15:52 UTC
    Not to quibble over the use of language which may be less than precisely clear, but you do understand, don't you, that "the module owners" are unpaid volunteers, all over the world?

    Why, the indivual or team responsible may even have been asleep, out fighting a fire, coaching a kid's team or -- horrors -- on vacation, when you encountered your problem.

Re^3: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by tobyink (Canon) on Aug 02, 2012 at 16:05 UTC

    Have you got WWW::Scripter::Plugin::Ajax installed?

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re^3: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by Anonymous Monk on Aug 03, 2012 at 09:32 UTC
Re^3: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by Anonymous Monk on Aug 03, 2012 at 03:33 UTC

    Hi,

    Are you using a different browser?
    This is the code I use.

    try { // Firefox, Opera 8.0+, Safari Http=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { Http=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { Http=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } }

    It may catch your error, it's worth a try.

    J.C.