This example uses jQuery and Ajax. Instead statically typing text in
javascript a server side script, perl CGI
 generates this.

This is very powerful. Now it is lame. But tomorrow we see how to do cool stuff.

http://awrdev.g3tech.in/simplejquery2.html

<html>
<head>
        <link rel="stylesheet" href="/css/stylesheet.css" type="text/css" />
        <script src="/jquery/jquery.min.js"> </script>
        <script>


$(function() {
        $('#add').click(function() {
                $('#container').load('/cgi-bin/text');
        });
        $('#clear').click(function() {
                $('#container').empty();
        });
})
        </script>
</head>
<body>
        <h1> Simple jQuery II </h1>

        <input id='add' type="button" value="Add Ajax text" />
        <input id='clear' type="button" value="Clean up" />

        <div id="container"></div>

</body>
</html>

The CGI is:

#!/usr/bin/perl

use CGI;

$q = new CGI;

print $q->header;


print "<br/>";
print "<br/>";
print "<h2> This is from Ajax </h2>";
print "<br/>";
print "<br/>";
print "END";


-Girish

-- 
Gayatri Hitech
http://gayatri-hitech.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to