
Why?
This library attempts to solve a few problems well. It does not attempt to do everything. Because of this an HTML/OS developer can use it with other libraries.
- Add AJAX without completely rebuilding existing HTML/OS code.
- Keep existing code clean and recognizable.
- Agnostic and resilient alongside other libraries like jQuery.
- Gracefully degrade.
So CLEAR.js attempts to do these things.
This library will deliver parts of a page. Those parts come from an overlay.
Below is an example of how a link can become an ajax link, and how an overlay can become an ajax overlay. The following demo will degrade nicely and continue to work even without javascript.
<<expand file="/system/clearimage/DLL.lib" /expand>>
<html>
<head>
<script src="/apps/clear/clear.js"></script>
</head>
<body>
<a href="announcement" AJAX>Click for the announcement...</a>
<hr>
<h1 id="message"></h1>
</body>
</html>
<<overlay announcement
if cnt="ERROR" then cnt=0 /if
cnt=cnt+1
writeHTML('message','Hello World! '+cnt)
endOVERLAY()
>>