[uf-rest] ahah/xhtml and meta tags (current ahah.js)
Justin Maxwell
soc at code404.com
Wed Jan 4 10:56:45 PST 2006
On 4 Jan 2006, at 10:47, Dr. Ernie Prabhakar wrote:
> Justin, could you also let us know which ahah.js you're currently
> using, as that might give us a better idea of what's going on.
Thanks for the answer!
We've allowed for a function pass through AHAH to execute upon
content load.
function ahah(url,target,func) {
document.getElementById(target).innerHTML = '<img src="/images/
waitanimation.gif" alt="wait" width="20" height="20" border="0"
id="wait">';
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = (func) ? function(){ahahDone
(target,func)} : function() {ahahDone(target);};
req.open("GET", url, true);
req.send(null);
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = (func) ? function(){ahahDone
(target,func)} : function() {ahahDone(target);};
req.open("GET", url, true);
req.send();
}
}
}
function ahahDone(target,func) {
if (req.readyState == 4) {
if (req.status == 200 || req.status == 304) {
results = req.responseText;
document.getElementById(target).innerHTML = results;
if (func) func();
} else { document.getElementById(target).innerHTML="ahah
error:\n" + req.statusText; }
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2468 bytes
Desc: not available
Url : http://microformats.org/discuss/mail/microformats-rest/attachments/20060104/7d8b2eb7/smime.bin
More information about the microformats-rest
mailing list