<script>function Sen_Player_Contact(){
var p_onvan=document.getElementById('onvan').value,
p_post=document.getElementById('post').value;
xmlhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
document.getElementById('Sen_Player_Loading').innerHTML='در حال ارسال نظر...';
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4 && xmlhttp.status==200){
document.getElementById('Sen_Player_Loading').innerHTML='<span style="color:green;">با موفقیت ارسال شد.<\/span>';
else{
document.getElementById('Sen_Player_Loading').innerHTML=xmlhttp.responseText;
}
}
};
xmlhttp.open('POST','/new_post',true);
xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
xmlhttp.send('field[1]='+encodeURIComponent(''+onvan+'')+'&field[2]='+encodeURIComponent(''+p_post+'')+'&contact='+encodeURIComponent('ارسال'));
return false;
}
</script>
<form method="post" id="f1" onsubmit="Sen_Player_Contact();return false;">
<input type="text" name="title" id="onvan" value="آیدی" />
<br>
<textarea dir="rtl" id="post" name="post" style="width:100%;height300px;">توضیحات</textarea>
<br><input type="submit" name="postsubmit" value=" ارسال " />
<div id="Sen_Player_Loading"></div>
</form>