$.get doesn't work in CrossRider in the background - browser-extension

Is it possible to use jQuery's $.get, $.post or $.ajax in the background when using CrossRider? I tried but it seems not to work.

In any Crossrider scope, we recommend using the Crossrider appAPI.request API methods to ensure browser & CORS compatibility. They are pretty similar to the jQuery counterparts and work for all browsers in all scope.
[Disclosure: I am a Crossrider employee]

Related

download progress with jsonp via ajax

In an internet very many example how extend $.ajax for get download (or upload) progress.
This example work perfect with plain-text, xml, json, but not work with jsonp. There are no reaction from event-listeners. I wrote this example on pure javascript, but no result. I know about script-append-to-DOM-way. Using this method can not get progress.
How i can get download progress with jsonp and via XMLHttpRequest?
I know about script-append-to-DOM-way.
JSONP is the script-append-to-DOM-way. There are no "progress" events on script tags AFAIK.

Do we need to use XMLHTTPRequest when we use Ajax?

I am new to Ajax.I found that Ajax will use XMLHTTPRequest. Can any one clarify me the usage of XMLHttpRequest without Ajax and with Ajax with an example.?
How asynchrnous Postback will occur ?
Thanks,
Rakesh.
XMLHTTPRequest is the underlying browser feature that makes what we call AJAX possible, you cannot have one without the other. Postback sounds like a reference to a .Net, which is a completely separate technology to AJAX/XMLHTTPRequest.
Find out more here

Browser extension for AJAX calls

I'm looking for browser extension (for Firefox or Google Chrome) that allow me to make AJAX calls. I'd like to specify:
Method (POST/PUT/GET/DELETE)
URL
Data to send (JSON/XML)
I know that I can make AJAX call from console, but it's nice to have dedicated tab for that.
I've found 2 nice extensions:
cREST Client - https://chrome.google.com/webstore/detail/baedhhmoaooldchehjhlpppaieoglhml
XHR POSTER - https://chrome.google.com/webstore/detail/akdbimilobjkfhgamdhneckaifceicen

JavaScript framework with, or easily extendable with, support for XmlHttpRequest.onprogress (emulated if necessary)

Which of JavaScript libraries and frameworks has support for "onprogress" event for XmlHttpRequest (perhaps as a plugin or extension), emulated if necessary? Alternatively which JavaScript framework would be easiest to extend to support xhr.onprogress?
By "emulated if necessary" I mean here that if web browser doesn't support XHR 2.0 "onprogress" event, then "onreadystatechange" would be used. Because some browsers fire onreadystatechange only once for each state, and do not call onreadystatechange on server flush, then some kind of timer / interval would probably be necessary to periodically check XHR object if it is such browser.
jQuery and YUI provide only success and error (or equivalent) callback
MooTools provide 'progress' event, but limited to Browsers that support the event. (At this time: Gecko and WebKit).
You may be able to extend jQuery to achieve what you desire with $.ajax Transports. You will have to do all the hard work yourself though.

How can I watch (i.e. debug) xmlHttpRequest() actions in IE8 ? (using Firebug Lite)

I normally do my web dev using Firefox - I periodically test for cross browser compatability of my pages by using FF and IE.
I have just found that one of my AJAX pages stopped working in IE - although it works fine in FF. With FF, I always use FireBug to debug my Ajax interactions. I am looking for a similar tool to use with IE - to see what it is causing it to fail, even though it is a straightforward AJAX process on the page.
I downloaded Firebug Lite and that was very helpful, as it brought a familiar dev environment into IE. Unfortunately, I have not been able to debug my AJAX interactions following the ForebugLite's documentation:
firebug.watchXHR: Use this function to watch the status of XmlHttpRequest objects.
var req = new XmlHttpRequest;
firebug.watchXHR(req);
I inserted that in my page - so the top of my page looks like this:
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'>
var req = new XmlHttpRequest;
firebug.watchXHR(req);
</script>
However, I still could not debug the AJAX interactions (i.e. nothing shows in the console window when I click on a link that triggers an AJAX call).
Has anyone managed to do this before (IE7 and Firebug Lite)?
Or, you could install Fiddler and watch all of your web traffic.
Try DebugBar - I think it will capture this.
To use Firebug lite, you have to attach Firebug to each XHR request. So you'll wanna call firebug.watchXHR(req); for each ajax request you make, before you fire the request.
If you are using a library such as Jquery or Prototypejs to make your Ajax requests, you can wire Firebug lite into the process for easy debugging.
charles is another option for studying your network traffic but debugBar would probably be my choice.

Resources