flXHR - getting started (a simple question)
I am trying to use the flXHR javascript library for making cross-domain calls.
I got stuck开发者_运维知识库 at the begining.
As they say in the docs, I copied the /deploy directory's content to a /scripts directory. All the dependencies are supposed to be included in the flXHR download.
This is my html, which returns several errors:
the errors:
y.base_path is undefined y.checkplayer is undefined y.ua is undefined E.attachEvent is not a function
thanks
flXHR is tested and works (AFAIK) on all major browsers' latest released versions. I don't revalidate the test-suite every single new release of any browser, but I do so from time to time.
With respect to the "base_path is undefined" error... the problem is not with flXHR (or CheckPlayer), but with how Firebug traps for JS errors.
I have a try/catch block around access of that variable, and if it's not present, then I take an alternate action. From a normal JS perspective, this is not a JS error, because the try/catch block catches it and deals with it. But Firebug still registers it as an error. This error is erroneous, and as far as I know is not going to affect any behavior in the rest of your code.
Again, to my knowledge, flXHR is currently working in all browsers. If you have issues, please visit the flXHR forum on http://flXHR.flensed.com.
I noticed the "y.base_path is undefined" error sometimes, but only when Firebug is open. Try closing firebug (or use a different browser) and see what happens.
精彩评论