chcę zrobić coś takiego, żeby po kliknięciu 'dodaj ogłoszenie" (gdy trzeba chwile zaczekać, aż się doda) osoba dodająca widziała co się dzieje, że musi chwilę zaczekać, czyli żeby wyświetlił jej się jakiś .gif loader.. przypuszczam, że ten urywek kodu za to odpowiada
Cytat
<button class="button2" type="button" id="submit_b" onclick="submit_checkt();"><?php echo JText::_('Dodaj ogłoszenie'); ?></button> <?php if(JRequest::getVar('id', 0, '', 'int' )>0){ }else{ } ?> <input type="hidden" name="boxchecked" value="0" /> </form> </div> </div> <script type="text/javascript"> function addImage(imglimit){ lim=document.djForm['image[]'].length; if(!lim){ lim=1; } if(document.djForm['usun[]']){ lim_old=document.djForm['usun[]'].length; if(!lim_old){ lim_old=1; } lim = lim + lim_old; } if(lim==imglimit){ }else{ var inputdiv = document.createElement('input'); inputdiv.setAttribute('name','image[]'); inputdiv.setAttribute('type','file'); var ni = $('uploader'); ni.appendChild(document.createElement('br')) ni.appendChild(inputdiv); } } function submit_checkt(){ if(document.getElementById("name").value==''){ }else if(document.getElementById("cat_id").value=='0'){ }else if(document.getElementById("intro_desc").value=='' ){ }else if(document.getElementById("description").value==' '){ }else if(document.getElementById("contact").value==''){ }else{ document.djForm.submit(); } function checkt(){ if(document.djForm.name.value.length<=40) { a=document.djForm.name.value.length; b=40; c=b-a; document.getElementById('ile').innerHTML= ''+c+''; } else { document.djForm.name.value = document.djForm.name.value.substring (0, 40); } } checkt(); </script>
ale nie wiem jaką komendę muszę wpisać, żeby zadziałało. Jest to urywek kodu DJClassifieds. Proszę o pomoc.
Adres strony gdyby był potrzebny i-olesnica.pl