U-Ajax
23 downloads
intro
u-ajax is a simple client side framework for ajax. u-ajax aims to reduce the effort of developers and lets them concentrate on the user interface, leaving the (asynchronous) server side communication issues to u-ajax.
an example
given below is an example usage of u-ajax. the server side script example is in perl. but it could be replaced by any server side script.
html
<html>
<head>
<title>AJAX</title>
<script language="javascript" src="u-ajax.js">
</script>
<script language="javascript">
var index;
uajax_init(0, 0);
index = ajax_add_functions('ajaxcall', 'ajaxcall2');
function ajaxcall2(resp) {
document.getElementById("results").innerHTML = resp;
}
function ajaxcall() {
ajax_do_call_report(index, "get", "cgi-bin/hello.pl");
}
</script>
</head>
<body>
<a href="javascript:ajaxcall()">Get a greeting from the server</a><br /><br />
<b>Message from the server:</b> <div id="results"></div>
<br>
</body>
</html>
server side - perl
#!/usr/bin/perl
print "content-type: text/html \n\n";
print "Hello from the server!";
comments
no comments have been posted for this project. please use the form below to post
your comment.