Solved

json with xmlhttprequesr

Posted on 2016-10-17
2
34 Views
Last Modified: 2016-10-28
BUT in javascript any external connections like AJAX XMLHttpRequest() or the newer WebSocket( )  WILL NOT WORK in a browser, because the XMLHttpRequest() requests a connection to the ajax URL which does not exist in a "File System" environment. So to have ANY javascript with the XMLHttpRequest() you MUST get a windows operating system server "SET UP" to handle web connection request that are use in the XMLHttpRequest() operation.


i was reading as above.

any good end to end examples, links on this?(prefrably using java web servers like tomcat etc rather than .Net engines(actually either is fine)

please advise
0
Comment
Question by:gudii9
2 Comments
 
LVL 21

Assisted Solution

by:Kim Walker
Kim Walker earned 250 total points
ID: 41847499
Without knowing the context of this comment, I'd have to say it is utterly false. However, in the context of a localhost-only, non-internet, non-intranet situation, it might be true.

Where did you find this statement?
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 41847527
AJAX makes an HTTP connection to a web server to get a response.  The normal file system does not have a way to respond to an HTTP request so you can't use AJAX to open local files.  A web server is necessary but it can be Linux or even Mac OSX instead of Windows.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
date format angularjs2 16 41
Condidional <a href = ....> 1 25
Image decoding from Camera 3 45
Adding Extra Information box 4 25
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now