Location: PHPKode > projects > Decider > decider/help/help.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<script language="javascript">
function getXmlHttpRequestObject() {
	
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		//alert("getxmlHttp");
		return new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
	}
}

//Our XmlHttpRequest object to get the auto suggest
var searchReq = getXmlHttpRequestObject();


//check the current div tag element id by using txtsearch id

//Starts the AJAX request.
var id;
var txtname;
function searchSuggest(txt) {

		if (searchReq.readyState == 4 || searchReq.readyState == 0) {
		var str = txt;
	
		id=txt;
		alert(id);
		txtname=txt;		
		searchReq.open("GET",'searchsugestquestion.php?search=' + str, true);
		searchReq.onreadystatechange = handleSearchSuggest; 
		searchReq.send(null);
		
		//alert("hello"+id);
	}		
}

//Called when the AJAX response is returned.



function handleSearchSuggest() {

	if (searchReq.readyState == 4) {
		var ss = document.getElementById(id)
		
		ss.innerHTML = '';
		var str = searchReq.responseText;//.split("\n");
		alert(str);
		for(i=0; i < str.length; i++) {
	
			//Build our element string.  This is cleaner using the DOM, but
			//IE doesn't support dynamically added attributes.
			var suggest = '<div onmouseover="javascript:suggestOver(this);" ';
			suggest += 'onmouseout="javascript:suggestOut(this);" ';
			//suggest += 'onclick="javascript:setSearch(this.innerHTML);" ';
			suggest += 'class="suggest_link">' + str[i] + '</div>';
			ss.innerHTML += suggest;
			
		}
		alert("ishan");
	}
}

//Mouse over function
function suggestOver(div_value) {
	div_value.className = 'suggest_link_over';
}
//Mouse out function
function suggestOut(div_value) {
	div_value.className = 'suggest_link';
}
//Click function
function setSearch(value) {
	//id.value=value;
	document.getElementById(txtname).value = value;
	document.getElementById(id).innerHTML = '';
}
//______________________________________________________________________


function suggestquestionload(obj){
	//alert(obj.value);
			document.getElementById("nquestion").value=obj.value;
			code = '<br>';
		var j=0;
		for(i=0;i<obj.selectedIndex;i++){
			txtsearch = "text"+i;
			divid="divid"+i;
			j++
			 code = code+'<tr><td class="label">'+(j)+'. Question </td><td><textarea cols="50" class="textboxarea"  id="'+txtsearch+'" name="'+divid+'" onkeyup="searchSuggest(this);" autocomplete="off" ></textarea ></td></tr><tr><td></td><td><span id="'+divid+'"></span></td></tr>'
			
		
		}
		code+='<tr><td></td><td><input type="submit"  value="Add" class="button" name="Add">&nbsp;&nbsp;&nbsp;<input type="button" value=" cancel " class="button"></td></tr>'
		document.getElementById("writehere").innerHTML = code;
	}
//-->
</script>

<style type="text/css" media="screen">
			body1 {
				font: 11px arial;
			}
			.suggest_link {
				background-color: #CCCCCC;
				padding: 2px 6px 2px 6px;
			}
			.suggest_link_over {
				background-color: #0066FF;
				padding: 2px 6px 2px 6px;
				cursor:pointer;
				
			}
			#divid0 {
				 
				position:absolute; 
				background-color: #CCCCCC; 
				color:#000000;
				text-align: left; 
				border: 1px solid #000000;			
			}	
			#divid1 {
				position:absolute; 
				background-color: #CCCCCC;
				color:#000000; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid2 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid3 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid4 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid5 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid6 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid7 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}	
			#divid8 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid9 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid10 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid11 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid12{
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid13 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid14{
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid15 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid16 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid17{
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid18 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid19 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid20 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid21 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid22 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}		
			#divid23 {
				 
				position:absolute; 
				background-color: #FFFFFF; 
				text-align: left; 
				border: 1px solid #000000;			
			}				
		</style>
	

</head>
<form name="form1" method="post" action="">
  <img src="officialvista.jpg" height="100" width="100" type="" name="Submit"  id="37" onClick="searchSuggest(this.id)">
</form>
</body>
</html>
Return current item: Decider