I try this dropdown form to send wrong data on page (movie information). This html code is dropdown form to send when user click on submit, javascript send GET data to another php file and there process data, but on place where is form data put Text: "Thank you"
Problem is: when i click on submit don't work, javascript is not doing its job.
html:
<div id='premijera' class='neispravniPodaci'>Report wrong data
<div id='neispravnaForma' class='arrow_box' >
<form name='frm1' action='' onSubmit='neispravniPod()' method='get'>
<input class='textbox' type='text' name='forma' placeholder='input for wrong data'>
<input type='submit' name='sendForm' value='Send' class='button'>
</form>
</div>
</div>
And javascript code is:
function neispravniPod()
{
var xmlhttp;
var forma=document.forms['frm1']['forma].value;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('neispravnaForma').innerHTML='<t style=\"font-size:15px;font-weight:bold;color:black;\">Hvala!</t>';
}
}
xmlhttp.open('GET','glasanje.php?id=".$idfilm."&neispravno='+forma+'&ip=".$_SERVER["REMOTE_ADDR"]."&korisnik=".$userdata['user_id']."',true);
xmlhttp.send();
}