Skip to main content
Java Script Request Handler

var xmlHttpRequestHandler = new Object();
var requestObject;

xmlHttpRequestHandler.createXmlHttpRequest = function(){
var XmlHttpRequestObject;
if(typeof XMLHttpRequest != "undefined"){
XmlHttpRequestObject = new XMLHttpRequest();
}
else if(window.ActiveXObject){
var tryPossibleVersions = ["MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"];
for(i=0;i try{
XmlHttpRequestObject = new ActiveXObject(tryPossibleVersions[i]);
break;
}
catch(xmlHttpRequestObjectError){
// Ignore Exception
}
}
}
return XmlHttpRequestObject;
}

function puthtml(url){
requestObject = xmlHttpRequestHandler.createXmlHttpRequest();
requestObject.onreadystatechange=onReadyStateChangeResponseCopy;
requestObject.open("Get",url, true);
requestObject.send(null);
}

function onReadyStateChangeResponseCopy(){
var ready, status;
try{
ready = requestObject.readyState;
status = requestObject.status;
}
catch(e) {}
if(ready == 4 && status == 200){
txt = requestObject.responseText;
var con = document.getElementById('searchbody');
con.innerHTML = txt;
}
}

Comments

eyzelnut said…
This comment has been removed by the author.
rushjudge said…
ajax ha...bro gamit ka nalang ng prototype o scriptalicious hehe para madali na lang...musta ulit? saan ka na?
Efren Valdez said…
Lolz, Pang mga dependent lang ung scriptalicious. Limited functions ba hihihi. Oks lang naman ako, mag face book ka tsong.
rushjudge said…
oo tsong, tama k nga. at least dap t alam mo pinakalow-level kaysa sa hih-level na mga frameworks agad. May facebook na nga ako, ginawa lng para sa akin..hehe. ingat bro. regards to your fam.

Popular posts from this blog

Automated Testing with Behat & Mink on Linux

Have time to read my introduction. Behat + Mink + Selenium Server will do the automatic testing for your website. Behat handles your test cases in a form of a sentence which consist of the following Feature - which is a description of your test case. Example is "Title Checking" Scenario - Feature consist of Scenario's Conditions - Scenario's consist of condition using the following tags "Given", "When", "Then", "And", "But" Example feature:  Feature: Google Search @javascript Scenario: Check Google Site When I go to " http://www.google.com " Then Capture a ScreenShot @javascript Scenario: Search Efren on Google Given I am on " http://www.google.com " When I input "Efren" in " gbqfq" element When press " Google Search " Then print current URL Then Capture a ScreenShot You need t...

Skipfish for CENTOS

#yum install openssl-devel #yum install pcre-devel #yum install libidn-devel #wget https://skipfish.googlecode.com/files/skipfish-2.10b.tgz #tar xzvf skipfish-2.10b.tgz #cd skipfish-2.10b #make #touch dict.wl #./skipfish -o output_dir -W dict.wl http://192.168.1.254

Trac Project Management Monitoring Installation

This guide assumes that you know how to install python packages Requirements sqlite backend: python sqlite and devel pysqlite genshi Installation: Install all the requirements add user by  #htdigest -c /path/to/your/passwordfile.txt realname username enter password  create you project #trac-admin /path/to/your/project enter information to remove sample wiki  #trac-admin /path/to/your/project wiki remove '*' to start your trac tracd -p 8080 --auth=*,/path/to/your/passwordfile.txt,realname /path/to/your/project