HERE IS THE LECTURE
--------------------------------------------
--------------------------------
HERE IS THE DEMO: http://www.afisoonebook.com/comment.html
-------------------------------------------------------------------------------------------
HERE IS THE COMMENT.HTML CODE
-----------------------------------------------------------
Code: Select all
<html>
<head>
<style>
</style>
<script type="text/javascript">
function sooDaabac()
{
var riix;
riix= new XMLHttpRequest();
riix.open("GET", "view.php?", true);
riix.onreadystatechange=function()
{
if(riix.readyState==4 && riix.status==200)
{
displayinfo(riix.responseText);
}else{
displayinfo("Qalad baa dhacay:"+riix.statusText);
}
}
riix.send(null);
}
function displayinfo(stext)
{
var divcustomerinfo=document.getElementById("divcustomerinfo");
divcustomerinfo.innerHTML=stext
}
</script>
<script type="text/javascript">
function commentDiv()
{
document.getElementById("qore").style.display="block";
}
function checkform(form)
{
if(form.qoraaga.value=="")
{
alert("magacaaga gali");
form.qoraaga.focus();
return false;
}
else if(form.qorde.value=="")
{
alert("qoraalka gali");
form.qorde.focus();
return false;
}
}
</script>
</head>
<body bgcolor="#e5eecc" onLoad="sooDaabac()">
<div>
<iframe width="560" height="315" src="http://www.youtube.com/embed/upu6H9tYbO8"
frameborder="0" allowfullscreen>
</iframe>
</div>
<div>
<br>
<br>
<a href="#" onClick="commentDiv()">Comment</a>
<div id="qore">
<form method="post" action="insert.php" onSubmit="return checkform(this)">
Qoraaga:<br><input type="text" name="qoraaga"><br>
Qoraalka:<br>
<textarea cols="40" rows="8" name="qorde">
</textarea><br>
<input type="submit" value="comment">
</form>
</div>
</div>
<div id="divcustomerinfo">
</div>
</body>
</html>
AUTHOR: MACALIN AFISOONE
