xirian 0 Newbie Poster

I don't know why sometimes in the page url's there is some kind of "get" attached like this:

http://localhost/web_marketing/prova/campaign.php?titolo_campagna=sdfsdf&descrizione_campagna=sdfsdf&registrati.x=41&registrati.y=18


Even if i use post in the ajax request.There must be something wrong with my code, if someone could help me please.

<script  type="text/javascript" >
var XMLHttpRequestObject=false;

	if(window.XMLHttpRequest){
	XMLHttpRequestObject=new XMLHttpRequest();
	}else if (window.ActiveXObject){
	XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
	}





		function prova(dataSource,divID,data)
		{

                var XMLHttpRequestObject=false;

                if(window.XMLHttpRequest){
                XMLHttpRequestObject=new XMLHttpRequest();
                }else if (window.ActiveXObject){
                XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
                }



		if(XMLHttpRequestObject) {

		var obj=document.getElementById(divID);
		XMLHttpRequestObject.open("POST", dataSource);
		XMLHttpRequestObject.setRequestHeader('Content-Type',
									'application/x-www-form-urlencoded');

		XMLHttpRequestObject.onreadystatechange=function()
		{
		if(XMLHttpRequestObject.readyState==4 &&
			 XMLHttpRequestObject.status==200)
			 {

                         obj.innerHTML=XMLHttpRequestObject.responseText;
                         
			 }
		}

		XMLHttpRequestObject.send("data=" +data)
		}
		}


 function redirect(id)
 {

document.getElementById(id).form.submit();


 }

 function getElemetsForm(){

var form = document.forms[2];
var numeroElementi = form.elements.length;
var stringa = "";







for(i=0;i<numeroElementi;i++){


     if(document.dati_campagna.elements[i].type=="checkbox"){
                       if(document.dati_campagna.elements[i].checked==true){

                           form.elements[i].value="s";
                       }
                           else{
                               form.elements[i].value="";
                           }

                         }
                if(i<(numeroElementi-1)){
                 
               
                   
                    stringa+=form.elements[i].name+"|^|"+form.elements[i].value+"|^|";

                }else{
                     stringa+=form.elements[i].name+"|^|"+form.elements[i].value;
                }


    

}







  return stringa;


}


function prova2(dataSource,divID)
		{

                var XMLHttpRequestObject=false;

                if(window.XMLHttpRequest){
                XMLHttpRequestObject=new XMLHttpRequest();
                }else if (window.ActiveXObject){
                XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
                }



		if(XMLHttpRequestObject) {

		var obj=document.getElementById(divID);
		XMLHttpRequestObject.open("POST", dataSource,true);
		XMLHttpRequestObject.setRequestHeader('Content-Type',
									'application/x-www-form-urlencoded');

		XMLHttpRequestObject.onreadystatechange=function()
		{
		if(XMLHttpRequestObject.readyState==4 &&
			 XMLHttpRequestObject.status==200)
			 {

                         obj.innerHTML=XMLHttpRequestObject.responseText;

			 }
		}


var stringa=getElemetsForm();


		XMLHttpRequestObject.send("stringa=" +stringa)
		}
		}






function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}






</script>