Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript value change
    primarykey
    data
    text
    <pre><code>if(isset($_POST['album_title'])) { $album_title = $_POST['album_title']; if($_FILES['pic_nr1']['type'] == 'image/jpeg' || $_FILES['pic_nr1']['type'] == 'image/jpg' || $_FILES['pic_nr1']['type'] == 'image/png' || $_FILES['pic_nr1']['type'] == 'image/gif' &amp; $_FILES['pic_nr2']['type'] == 'image/jpeg' || $_FILES['pic_nr2']['type'] == 'image/jpg' || $_FILES['pic_nr2']['type'] == 'image/png' || $_FILES['pic_nr2']['type'] == 'image/gif' &amp; $_FILES['pic_nr3']['type'] == 'image/jpeg' || $_FILES['pic_nr3']['type'] == 'image/jpg' || $_FILES['pic_nr3']['type'] == 'image/png' || $_FILES['pic_nr3']['type'] == 'image/gif' ) { } else { ?&gt; &lt;script type="text/javascript"&gt; document.getElementById("error_for_js").innerHTML = "Bilžu formāts nav derīgs! &lt;small&gt; GIF, JPEG, JPG, PNG ir autļauti.&lt;/small&gt;"; &lt;/script&gt; &lt;?php } } ?&gt; &lt;form enctype="multipart/form-data" method='post' action='' onsubmit='if(document.getElementById("titleeee").value.length &lt; 3 ) { document.getElementById("error_for_js").innerHTML = "Albūma nosaukumam ir jābūt garākam!"; return false; } else { return true; }' &gt; &lt;p id='error_for_js'&gt;&lt;/p&gt; Albūma nosaukums: &lt;input id='titleeee' type='text' name='album_title' /&gt;&lt;br /&gt; Bilde Nr 1: &lt;input type='file' name='pic_nr1' /&gt;&lt;br /&gt; Bilde Nr 2: &lt;input type='file' name='pic_nr2' /&gt;&lt;br /&gt; Bilde Nr 3: &lt;input type='file' name='pic_nr2' /&gt;&lt;br /&gt; Aktīvs*: &lt;select&gt; &lt;option&gt;Jā&lt;/option&gt; &lt;option&gt;Nē&lt;/option&gt; &lt;/select&gt;&lt;br /&gt; &lt;input type='submit' value='Pievienot' /&gt; &lt;/form&gt; </code></pre> <p>I dont understand why value of <code>id='error_for_js'</code> dont change if file format is wrong, i did the <code>getElementById('error_for_js').innerHTML = 'new value'</code>; but its not changing !? Ideas ?</p>
    singulars
    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.
 

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