View Full Version : Ext.ajax request

1 Jul 2010, 2:30 AM
hi i have read that ext.ajax is a singleton. how i can make 2 different requests for example a get on servlet1 and a post on servlet2?

1 Jul 2010, 2:39 AM
The important part in the docs is:

This class is a singleton and cannot be created directly.

You can make multiple requests, you just don't create an instance of Ext.Ajax - there is one already - and if there is anything particular (i.e., non-common properties) about the request, you just change them in the request (http://www.sencha.com/deploy/dev/docs/?class=Ext.Ajax) function's options parameter.

1 Jul 2010, 4:13 AM
thanks for the answer, but i don't understand all. my script is this http://pastebin.com/QxyB8kKW at the beginning make a get request and servlet return a page with some links and when i click on a link i want make other request to get me the documet in the link. how i can do it?

1 Jul 2010, 4:37 AM
There are many ways to do it..

A couple of methods..

1) You add onclick events to the links on the fly when you get the response.

2) Add inline javascript to links calling a specific function which makes the request

1 Jul 2010, 4:43 AM
thanks i will try