Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [saibal news] cerco di creare una textarea con il vb code...

    ... ma niente...

    non ne vuole sapere di andare...

    ho seguito questa procedura:

    1. o "copiato" il codice HTML della textarea con i javascript per i pulsanti del VBCODE...
    2. o linkato i javascript in file esterno come nell'area admin dello script di lorenzo...
    3. non funziona niente...



    a dire il vero una cosa la fa...
    se scrivo dentro la textarea, seleziono una parte di scritta e clicco (per esempio...) sul pulsante del grassetto, allora correttamente inserisce il testo selezionato all'interno dei TAG ['b] e ['/b]

    altrimenti mi dice:
    document.saibal.test è nullo o non è un oggetto...




    help me...
    Ciao!

  2. #2
    Questo è il codice della textarea:

    codice:
                   <td>
    
                
    
    <input type="button" accesskey="B" class="submit" name="_addcode0" value=" B " onClick="bbstile(0, 'testo','_addcode',2)"; style="width:10mm">
    <input type="button" accesskey="I" class="submit" name="_addcode2" value=" i " onClick="bbstile(2, 'testo','_addcode',2)"; style="width:10mm">
    <input type="button" accesskey="U" class="submit" name="_addcode4" value=" u " onClick="bbstile(4, 'testo','_addcode',2)"; style="width:10mm">
    <input type="button" accesskey="L" class="submit" name="_addcode6" value="List" onClick="bbstile(6, 'testo','_addcode',2)"; style="width:10mm">
    <input type="button" accesskey="C" class="submit" name="_addcode10" value="Center" onClick="bbstile(10, 'testo','_addcode',2)"; style="width:18mm">
    <input type="button" accesskey="Q" class="submit" name="_addcode16" value="Quote" onClick="bbstile(16, 'testo','_addcode',2)"; style="width:14mm">
    
    <input type="button" accesskey="F" class="submit" name="immagini" value="Img" onClick="url_prompt('testo','img','')" style="width:10mm">
    <input type="button" accesskey="Z" class="submit" name="_addcode8" value="URL" onClick="bbstile(8, 'testo','_addcode',2)"; style="width:10mm">
    <input type="button" accesskey="X" class="submit" name="url=" value="URL=" onClick="url_prompt('testo','none','')" style="width:10mm">
    <input type="button" accesskey="E" class="submit" name="email" value="Email" onClick="url_prompt('testo','email','')" style="width:10mm">
    <input type="button" accesskey="D" class="submit" name="_addcode12" value="Download" onClick="bbstile(12, 'testo','_addcode',2)"; style="width:18mm">
    <input type="button" accesskey="P" class="submit" name="_addcode14" value="Code" onClick="bbstile(14, 'testo','_addcode',2)"; style="width:14mm">
    <input type="button" class="submit" name="chiudi" value="Chiudi tag" onClick="bbstile('-1', 'testo','_addcode',2)"; style="width:20mm;margin-left:8mm">
    
    <textarea name="testo" class="textareagrande" rows="16" cols="60" wrap="virtual" onSelect="storeCaret(this);" onClick="storeCaret(this);" onKeyup="storeCaret(this);"></textarea>
    
    
    [<font class="piccolino">controlla la lunghezza del testo </font>]
    
    
                
                </td>
    Ciao!

  3. #3
    e questo l'header incluso a capo pagina...

    codice:
    <?php
    
    ?>
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="it">
    <title><?php if(isset($array['page_main_title'])){ echo "$array[page_main_title]"; } else { echo "Pagina di Amministrazione"; } ?></title>
    <link rel="stylesheet" href='<?php echo $mfweb_css; ?>' type="text/css">
    
    <script language="Javascript" src="js/phpbb.js"></script>
    <SCRIPT language="JavaScript" SRC="js/menu.js"></SCRIPT>
    <SCRIPT language="JavaScript" SRC="js/popup.js"></SCRIPT>
    <script language="Javascript" src="js/vbcode_cat.js"></script>
    <script language="JavaScript" src="js/div_anteprima.js"></script>
    <script language="JavaScript" src="js/vb_code.js"></script>
    <script language="JavaScript">
    <!--
    function controllo_form() {
    
    	if (document.saibal.art_titolo.value == "") {
        alert( "Il campo TITOLO è obbligatorio" );
    	document.saibal.art_titolo.focus();
        return false ;
      	}
    }
    -->
    </script>
    
    <script language="JavaScript">
    <!--
    
    //contacaretteri
    var ns6=document.getElementById&&!document.all
    
    function restrictinput(maxlength,e,placeholder){
    if (window.event&&event.srcElement.value.length>=maxlength)
    return false
    else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
    var pressedkey=/[a-zA-Z0-9\.\,\/]/
    if (pressedkey.test(String.fromCharCode(e.which)))
    e.stopPropagation()
    }
    }
    
    function countlimit(maxlength,e,placeholder){
    var theform=eval(placeholder)
    var lengthleft=maxlength-theform.value.length
    var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
    if (window.event||e.target&&e.target==eval(placeholder)){
    if (lengthleft<0)
    theform.value=theform.value.substring(0,maxlength)
    placeholderobj.innerHTML=lengthleft
    }
    }
    
    
    function displaylimit(theform,thelimit){
    var limit_text='<span style="background: #005AEC;"><font class="piccolino" color=white><span id="'+theform.toString()+'">'+thelimit+'</span> caratteri rimanenti</font></span>'
    if (document.all||ns6)
    document.write(limit_text)
    if (document.all){
    eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
    eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
    }
    else if (ns6){
    document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
    document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
    }
    }
    //-->
    </script>
    Ciao!

  4. #4
    risolto!!

    il problema era che non avevo impostato il nome al form.


    GRAZIE A TUTTI PER L'AIUTO!!





    Ciao!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.