Code: Select all
function getAjax(){
new Ajax('cont.html', {
method: 'post',
update: $('gmd')
}).request();
}
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ajax Testing</title>
<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript" src="custom.js"></script>
</head>
<body>
<div id="gmd">Page Content loaded here!</div>
<a href="replaced.php" onClick="getAjax(); return false;">get page!</a>
</body>
</html>
Any help is appreciated![/syntax]