PageRenderTime 192ms CodeModel.GetById 110ms app.highlight 2ms RepoModel.GetById 79ms app.codeStats 0ms

/ajax/scripts/remoteLog.js

http://showslow.googlecode.com/
JavaScript | 24 lines | 14 code | 3 blank | 7 comment | 3 complexity | 3931cd326365ccd3d39d76509a7fbb37 MD5 | raw file
 1/*======================================================================
 2 *  RemoteLog
 3 *
 4 *  This is a singleton that permis logging of key-valued data to a 
 5 *  remote location. 
 6 *======================================================================
 7 */
 8 
 9SimileAjax.RemoteLog = {
10    defaultURL:"http://groups.csail.mit.edu/haystack/facetlog/logger.php", 
11    url:null,
12    logActive: false
13};
14
15SimileAjax.RemoteLog.possiblyLog = function(vals) {
16    if ((SimileAjax.RemoteLog.logActive) && (SimileAjax.RemoteLog.url != null)) {
17        vals["url"] = window.location.href;
18	try {
19        SimileAjax.jQuery.ajax({type:'POST',url:SimileAjax.RemoteLog.url,data:vals});        
20	}
21	catch (e) {}
22    }
23};
24