Note that there are some explanatory texts on larger screens.

plurals
  1. POjavascript send form with get method
    primarykey
    data
    text
    <p>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"</p> <p>Problem is: when i click on submit don't work, javascript is not doing its job. </p> <p>html:</p> <pre><code>&lt;div id='premijera' class='neispravniPodaci'&gt;Report wrong data &lt;div id='neispravnaForma' class='arrow_box' &gt; &lt;form name='frm1' action='' onSubmit='neispravniPod()' method='get'&gt; &lt;input class='textbox' type='text' name='forma' placeholder='input for wrong data'&gt; &lt;input type='submit' name='sendForm' value='Send' class='button'&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>And javascript code is:</p> <pre><code>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 &amp;&amp; xmlhttp.status==200) { document.getElementById('neispravnaForma').innerHTML='&lt;t style=\"font-size:15px;font-weight:bold;color:black;\"&gt;Hvala!&lt;/t&gt;'; } } xmlhttp.open('GET','glasanje.php?id=".$idfilm."&amp;neispravno='+forma+'&amp;ip=".$_SERVER["REMOTE_ADDR"]."&amp;korisnik=".$userdata['user_id']."',true); xmlhttp.send(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload