nxt's place

Tag: ajax

cross domain AJAX

by on Nov.24, 2006, under Java

Using AJAX (which implies the use of the XMLHttpRequest) has one big
limitation, you can only make requests to the server from where the
page was downloaded.
As an alternative you can use javascript to dynamically include other javascript files which should be generated serverside.

An example on how to call the server:

function callServer() {
 var head = document.getElementsByTagName("head").item(0);
 var myTag = document.createElement("script");
 myTag.setAttribute("type", "text/javascript");
 myTag.setAttribute("src",
  "http://example.com/application/getjs/?var1=value1");
 head.appendChild(myTag);
}

The idea is that you generate the javascript that you need by dynamically add another script tag on the page.
for an excellent example of this approach you can read this javaworld article

Comments Off on cross domain AJAX :, , more...

ajax

by on Jul.05, 2005, under Java

I recently discovered Direct Web Remoting.
DWR is a framework wich makes it easy to call serverside code from the
client side and allows you to do all kind of cool things. Even though
it is still impossible to push information from the server to the
client this allows you to build a more rich interface.

for example, if you wanted to update a record in the database through a
form, this technology allows you to verify if the new data can be
inserted or if the record has been updated by another user without the
need to leave the page.
Another example is Google Suggest which provides a list with possible search terms and the amount of results while you type.

Comments Off on ajax :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...