Re: [quote][b][color=red]For educational purposes only.[/color][/b][/quote]
[b]Updated as of April 15, 2008 [Internalize AJAX handler & new AJAX URL][/b]
[b]Browser compatible: Firefox 2+, Firefox 3, IE 6
ok feruzz just help on this part, what will i do next with this code?
function getPrimaryImage(mypic) {
viewerMpic = /(<img\s*src=(['"][\S\s]+?['"]))>/.exec(mypic)[1].replace(/([\d]+?)/g, "$1");
if(window.vwidth && window.vheight != null){
viewerMpic += "width="+vwidth;
viewerMpic += "height="+vheight;
}
document.getElementById("mainpic").innerHTML = viewerMpic+"/>";
}try {
if(document.getElementById("mainpic") != null) {
try {
vwidth = /width=(\d+)/.exec(document.getElementById("mainpic").innerHTML)[1];
}catch(err){}
try{
vheight = /height=(\d+)/.exec(document.getElementById("mainpic").innerHTML)[1];
}catch(err){}
AjaxRequest('viewerPic','http://www.friendster.com/modules/module.php?uid="+pageViewerID+"&_pmr=h&_pmmo=0&_pmt=amf','getPrimaryImage','viewerPic1');
}
}catch(e){}
function AjaxRequest(xmlHttp,base_domain,ajaxfunc,createAjax) {
eval("var "+xmlHttp);
eval(xmlHttp+"=window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject('Msxml2.XMLHTTP');");
eval(xmlHttp+".onreadystatechange=function(){if("+xmlHttp+".readyState==4){"+createAjax+"="+xmlHttp+".responseText;"+ajaxfunc+"("+createAjax+")}}");
eval(xmlHttp+".open('GET','"+base_domain+"',true);");
eval(xmlHttp+".send(null);");
}