Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*window.onload=function() {
- uploadDiv=document.getElementById('upload');
- newap=document.getElementById('new');
- newap.href='#';
- newap.onclick=function() {
- ajax_request('req=queform',uploadDiv);
- return false;
- }
- }*/
- var G_Sending=false;
- //--------------------------------------------------------
- function createHTTP() {
- var r;
- try {r= new XMLHttpRequest() }
- catch(e) {
- try {r=new ActiveXObject('Msxml2.XMLHTTP');}
- catch(e) {r=new ActiveXObject('Microsoft.XMLHTTP')}
- }
- return r;
- }
- //--------------------------------------------------------
- function ajax_request(param,el) {
- XHR=createHTTP();
- XHR.el=el;
- XHR.onreadystatechange= function() {
- //alert(this.readyState);
- if (this.readyState==4) {
- //if (this.status=200) {
- el3=document.getElementById(this.el);
- el3.innerHTML=this.responseText
- //}
- G_Sending=false;
- }
- else if (this.readyState==3) {
- el3=document.getElementById(this.el);
- el3.innerHTML='Waiting...';
- }
- }
- XHR.open('POST','upload3.php',true);
- XHR.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- XHR.send(param);
- //XHR.open('GET','upload3.php?'+param,true);
- //XHR.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- //XHR.send(null);
- }
- //--------------------------------------------------------
- //--------------------------------------------------------
- function send_form(f) {
- var params='rssname='+f.rssname.value+'&rssquery='+
- encodeURIComponent(f.rssquery.value)+'&req=postform';
- //alert(params);
- //alert(f);
- G_Sending=true;
- f.subm.disabled=true;
- ajax_request(params,"status");
- setTimeout('refr_list();',100);
- }
- //--------------------------------------------------------
- function refr_list () {
- if (G_Sending) {
- setTimeout('refr_list();',500);
- } else {
- document.forms["goo"].subm.disabled=false;
- ajax_request('req=list',"list");
- }
- }
- //--------------------------------------------------------
- function get_rss(rssurl,count,el) {
- var params='req=getrss&rssq='+rssurl+'&count='+count;
- ajax_request(params,el);
- }
- //--------------------------------------------------------
- function get_block(blockname, el) {
- var params='req=getblock&bname='+blockname;
- ajax_request(params,el);
- }
- //--------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement