NodeJS+Express: Multiple cross domain calls?

So I'm looking for a way to keep making GET/AJAX calls on user input from somewhere in my client side code to an external address, for eg: http://www.busbud.com/en/complete/locations/Ca?callback={fn} and to return the body from that page.

What's the best way to do this?

Answers


you can use jQuery ajax method with JSONP as data type to make cross-domain calls. I have tried it successfully for a facebook app on express. http://codeforbrowser.com/blog/cross-domain-request-with-jquery-and-jsonp/


Need Your Help

Initializing Malloc'ed structure

c malloc structure

I am trying to initalize a structure using braces, but i am really trying to initalize the structure that is pointed to by a pointer returned from a malloc call.

Editable DOM in HTML, like Google Docs

javascript html

I'm a little curious about how the editing of Google Docs works. How did they implement an editor within the DOM? It does not really looks like a form with a textarea, but rather a normal document ...