Current File : /home/inlingua/www/noida/icentex/js/student.js
/* Making a request.*/
function createRequestObject()
{
/* Initialising the variable xmlhttp */
	var xmlhttp=false;
	
/* Try and catch block for creating xmlhttp object according to the browser */
	try
	{
	/* The xmlhttp object is built into the Microsoft XML Parser. */
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try 
		{
		/* The xmlhttp object is built into the Microsoft IE. */
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch (E) 
		{
			xmlhttp = false;
		}
	}
/* The xmlhttp object is built into the browsers other than Microsoft IE. */
	if (!xmlhttp && typeof XMLHttpRequest!='undefined')
	{
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function displaystudent(courseid)
{
	//alert(levelid);
	//language=document.getElementById('language_id').value;
	document.getElementById('student_display_id').innerHTML = "<table width='200'><tr><td align='center'><img src='images/indicator.gif' style='border:none;' height='100'></td></tr></table>";

	
	var e = document.getElementById("course_type");
var coursetype = e.value;
	//alert(coursetype);
	//return false;
	var request = createRequestObject();
	
	url='student_ajax.php?&CID='+courseid+'&course_type='+coursetype;
	
	request.open('GET',url , true);
	//alert(url);
	request.onreadystatechange = function()
	{
		if(request.readyState == 4)
		{
			
			if(request.status == 200)
			{
				
				var response = request.responseText;
				//alert(response);
				document.getElementById('student_display_id').innerHTML = response;
				//document.getElementById('sub').disabled = false;
			}
		}
	}
	request.send(null);
}