/**
* Credit: http://www-128.ibm.com/developerworks/xml/library/x-ajaxxml3/index.html?ca=dnw-812
*/
var req = null;
function processReqChange() {
if (req.readyState == 4 && req.status == 200 ) {
var dobj = document.getElementById( 'htmlDiv' );
dobj.innerHTML = req.responseText;
}
}
function loadUrl( url ) {
if(window.XMLHttpRequest) {
try { req = new XMLHttpRequest();
} catch(e) { req = false; }
} else if(window.ActiveXObject) {
try { req = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
try { req = new ActiveXObject('Microsoft.XMLHTTP');
} catch(e) { req = false; }
} }
if(req) {
req.onreadystatechange = processReqChange;
req.open('GET', url, true);
req.send('');
}
}
var seachTimer = null;
function runSearch()
{
if ( seachTimer != null )
window.clearTimeout( seachTimer );
seachTimer = window.setTimeout( function watchSearch() {
var url = window.location.toString();
var searchUrl = 'antipat1_content.html?s='+searchText.value;
url = url.replace( /antipat1b_fixed.html/, searchUrl );
loadUrl( url );
seachTimer = null;
}, 1000 );
}
PHP and javascript snippets you can copy and paste.
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(71)
-
▼
March
(25)
- net_get_HTMLDescriptionFromCode($HTMLCode)
- net_increment_ipAddress($iPAddress)
- sec_remove_emailInjectionChars($str)
- str_get_textBetween($start,$end,$str)
- str_remove_doubleQuotes($str)
- str_remove_Quotes($str)
- ajax request
- str_remove_singleQuotes($str)
- str_explode_strAssoc($separator,$assignSeparator,$...
- str_get_strlenmb($s)
- str_get_substrmb($s,$start,$len)
- ajx_print_r
- str_remove_strFromStart($needle,$haystack)
- file_write($fileName, $data, $mode)
- net_get_remoteFile($path,$method='GET',$timeout=30)
- str_get_pointsBetween($start,$end,$s,$n=0)
- dir_do_dirIteratorCallback($dir,$fn,$params)
- fnc_conv_argsToArray()
- net_conv_urlStringToArray($urlStr)
- net_conv_arrayToURLStr($arr,$prefix,$arg_separator)
- xml_get_isXML($xml)
- str_get_strMatchesEnd($needle,$haystack)
- str_conv_strToLowerCaseArray($separator,$s)
- fnc_wrap($fnc)
- net-get-randomIP()
-
▼
March
(25)
No comments:
Post a Comment