daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="form-container">
  2.     <div id="0" class="grupa">
  3.         <span class="style1">
  4.             Odaberite sliku
  5.         </span>
  6.         <div class="grupa">
  7.             <label for="lista-slika" class="style1">Odaberite sliku:</label>
  8.             <select class="lista-slika">
  9.             <?php
  10.                 while($pic = mysql_fetch_assoc($raw)){
  11.                     echo '<option value="' . $pic['putanja'] . '">' . $pic['naziv'] . '</option>':
  12.                 }
  13.                 mysql_free_result($raw);
  14.             ?>
  15.             </select>
  16.             <input type="button" value="Odaberi" onClick="promjenisliku(this.parentNode)" />
  17.             <label for="pic_url">URL:</label>
  18.             <input name="pic_url" /><br />
  19.         </div>
  20.     </div>
  21. </div>
  22.  
  23. <script type="text/javascript">
  24.     var fields = 0;
  25.  
  26.     function addInput() {
  27.        
  28.         if (fields < 10) {
  29.             document.getElementById('form-container').appendChild(document.getElementById('0'));
  30.             fields++;
  31.         } else {
  32.             document.getElementById('form_container').innerHTML += "<br />Only only 10 input fields allowed.";
  33.             document.getElementById('add').disabled = true;
  34.         }
  35.     }
  36. </script>
RAW Paste Data
Top