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


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

I have no idea what went wrong.

Unsupported feature is unsupported (activex)

  • Comment on Re: perl scripter error ReferenceError: The variable ActiveXObject has not been declared

Replies are listed 'Best First'.
Re^2: perl scripter error ReferenceError: The variable ActiveXObject has not been declared
by gurudutt.rv (Initiate) on Aug 02, 2012 at 12:15 UTC
    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?

      "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.
      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.

      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'

      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.