Originally posted by Ulf Dittmer:
Welcome to JavaRanch.
Unlike web apps, applets do not really have a "deployment" process. You just put them in one of the publicly accessible directories, and they're available right away. Any jar files you have go into the same directory that the HTML file containing the applet is in, not into the WEB-INF/lib directory. To use them, you need to specify them in yout applet tag via " archive="some.jar" ".
Originally posted by graham king:
found here: http://www.prototypejs.org/learn/introduction-to-ajax
Thanks man!![]()
Originally posted by Bear Bibeault:
Depends on how you are doing your Ajax. If you are using a smart library such as Prototype or jQuery, you can embed a script tag into the returned response and it will be executed when the response is added to the DOM.
Otherwise, not so easy...
Updating your page dynamically with Ajax.Updater
Developers often want to make Ajax requests to receive HTML fragments that update parts of the document. With Ajax.Request with an onComplete callback this is fairly easy, but with Ajax.Updater it's even easier!
Suppose you have this code in your HTML document:
<h2>Our fantastic products</h2>
<div id="products">(fetching product list ...)</div>
The 'products' container is empty and you want to fill it with HTML returned from an Ajax response. No problem:
new Ajax.Updater('products', '/some_url', { method: 'get' });
That's all, no more work. The arguments are the same of Ajax.Request, except there is the receiver element in the first place. Prototype will automagically update the container with the response using the Element.update() method.
If your HTML comes with inline scripts, they will be stripped by default. You'll have to pass true as the evalScripts option in order to see your scripts being executed.
Originally posted by Bear Bibeault:
For a quick learning curve and easy retro-fitting, I'd recommend jQuery over Prototype.
Originally posted by Bear Bibeault:
Yes. Don't.
In this day and age, not using a library for your Ajax is borderline insane. There are so many nuances that these libraries take care of for you (embedded JavaScript being just one of them), that trying to do "raw Ajax" should be a committable offense.
So why are you doing it the "hard way"?
Originally posted by Bear Bibeault:
Depends on how you are doing your Ajax. If you are using a smart library such as Prototype or jQuery, you can embed a script tag into the returned response and it will be executed when the response is added to the DOM.
Otherwise, not so easy...
Originally posted by Vilmantas Baranauskas:
Yes, it is possible.
If your application is running inside tomcat, you may use tomcat compression.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
If your application server is connected through apache, you may use apache's deflate_module to compress result.
Originally posted by Bear Bibeault:
Different browsers will implement this differently. Why do you care? You're never going to get anything but a form implementation from document.forms (unless it's undefined which is easily tested for) so why the need for a check?
Originally posted by Bear Bibeault:
Yup.