By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,190 Members | 2,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,190 IT Pros & Developers. It's quick & easy.

Connecting to a socket using javascript

P: n/a
Is there anyway to connect to a socket via javascript. Im writing an
application where IE on the client pc..needs to connect to a server and get
some information before forward to an action class for processing...I have
the following options..

applet, activeX..what other solution is there and what wooutl be the easiest
to do. If I go activeX using C# or vb.net i will have to worry about
configuring security on the clients workstations..

If i use an applet I also have to worry about the correct jre plugin
installed..

what can i use without worrying about too much about security..this is a web
application on the company intranet.

its a web app..built with struts/jsp/spring/javascript....and i need to do
some work on the client side first gathering information from another server
before passing it to my web server...

any ideas?

thanks
Feb 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a


I think you're describing Asynchronous js, so-called AJAX using the
XMLHttpRequest method for fetching data/files from servers without
having a page reserving. Check in google for it.

Danny
Feb 11 '06 #2

P: n/a
VK

Lans Redmond wrote:
its a web app..built with struts/jsp/spring/javascript....and i need to do
some work on the client side first gathering information from another server
before passing it to my web server...


In such case nothing can be done client-side withing the default
security settings. No matter what solution would you choose,
cross-domain communication is blocked.

If you cannot / don't want to change security settings for each
involved machine, then the only way is to be a hacker on your own
server.

Take any of existing content grabbers (Perl, PHP, ASP - whatever you
like) and install it on your server. Now to communicate over Ajax with
your own server you are using direct addressing as before. To
communicate with another server you are calling your content grabber,
grabber gets the data from other server and forwards it to the client
so formally it stays withing the same domain.

Very stupid and security-wise useless, but IXMLHTTPRequest /
XMLHttpRequest designers wanted it this way.

By the way: for Ajax I recommend <http://www.ajaxtoolbox.com>

Feb 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.