| var ajaxObject = AjaxObject(); |
| |
| function AjaxObject () { |
| if (window.XMLHttpRequest) |
| return new XMLHttpRequest(); |
| else if (window.ActiveXObject) |
| return new ActiveXObject('Microsoft.XMLHTTP'); |
| else |
| alert ("Error Creating AjaxObject"); |
| return false; |
| } |
| |
| |
| function clickCount(nid, platform) |
| { |
| var cc_url = "/downloads/packages/node/eclipsem/click_count_handler"; |
| var params = "node=" + escape(nid) + "&platform=" + escape(platform); |
| ajaxObject.open("POST", cc_url, true); |
| ajaxObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); |
| ajaxObject.setRequestHeader("Content-length", params.length); |
| ajaxObject.setRequestHeader("Connection", "close"); |
| ajaxObject.send(params); |
| } |