Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12
  1. #1

    Parole chiave Ie e Opera author id

    Ciao.
    Qualcuno mi sa dire per quale strano motivo
    (almeno per me)

    con una cosa del genere
    Codice PHP:
    <input name="c_author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1"  /> 
    ie e opera in uno script mi davano errore su id author
    e cambiando in questo modo
    Codice PHP:
    <input name="c_author" type="text" title="author" value="" id="c-author" maxlength="25" tabindex="1"  /> 
    tutto funziona


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    Impossibile saperlo senza conoscere il codice dello script!

  3. #3
    codice:
    <script type="text/javascript">
    onload = function(){
    	alert(document.getElementById("author").getAttribute("maxlength"))
    };
    </script>
    <input name="c_author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1"  />
    tutto regolare
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  4. #4
    Prova così:
    codice:
    <input name="author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1"  />
    name e id dovrebbero coincidere.
    Nel primo caso erano differenti.

  5. #5
    Originariamente inviato da H5N1_Aviaria
    Prova così:
    codice:
    <input name="author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1"  />
    name e id dovrebbero coincidere.
    Nel primo caso erano differenti.
    Si così ie s'incavola e non è un bel vedere


    @andr3a

    E' tutta la mattina che ci sbatto la testa
    e mi rendo conto che author è un valido id
    ma PP di errori non ce ne stanno ho debuggato
    tutto lo script pezzeto per pezzetto e Ie e Opera
    con quel id vanno in confusione.
    Isolando lo snippet tutto funziona ho controllato
    se avessi usato un doppio id ma niente
    va bè per oggi il mal di testa è assicurato allego
    uno snippet tanto per la cronaca
    Tra una settimana dovrei mettere il tutto in rete tengo il link
    Codice PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
    <
    head>
    <
    title>Blogerino</title>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    link type="text/css" rel="stylesheet" href="css/main.css" />
    <
    script type="text/javascript">
    function 
    _createElement(el,obj){
        var 
    _eldocument.createElement(el);
        for(var 
    prop in obj){
             
    _el.setAttribute(prop,obj[prop]);
        }
        return 
    _el;
    };
    function 
    _createTextNode(text){
        return 
    document.createTextNode(text);
    };
    function 
    _removeChild(parent,child){
        if(
    child != null){
            
    parent.removeChild(child);
        }
    };
    function 
    addEvent(elmevTypefnuseCapture){
        if (
    elm.addEventListener){
                
    elm.addEventListener(evTypefnuseCapture);
                return 
    true;
        } else if (
    elm.attachEvent) {
            var 
    elm.attachEvent('on' evTypefn);
            return 
    r;
        } else {
            
    elm['on' evType] = fn;
        }
    };
    function 
    cancelClick(e){
        if (
    window.event){
            
    window.event.cancelBubble true;
            
    window.event.returnValue false;
            return;
        }
        if (
    e){
            
    e.stopPropagation();
            
    e.preventDefault();
        }
    };
    function $(){
        var 
    elements = new Array();
        for (var 
    0len arguments.lengthleni++){
            var 
    element arguments[i];
            if (
    typeof element == 'string'){
              
    element document.getElementById(element);
            }
            if (
    arguments.length == 1){
              return 
    element;
            }
            
    elements.push(element);
          }
        return 
    elements;
    };
    /* Validation */
    function isEmpty(val) {
       return !/\
    S/.test(val);

    function 
    isValidEmail(str) {
        
    // [url]http://www.devpro.it/php4_id_2.html[/url]
        
    return Boolean(str.match(/^([a-z0-9]+[\._\-]?){1,3}([a-z0-9])*\@([a-z0-9]+[\.\-]?){1,3}([a-z0-9])*\.[a-z]{2,6}$/i));
    };
    function 
    isInt(val) {
       return /^[
    1-9]\d{0,9}$/.test(val);
    };
    function 
    isUrl(url){
        return /^(\
    w{2,6}:\/\/|www[0-9]*\.)\w+\.\w{2,6}/.test(url);
    };
    function 
    isEmptyV(id,errMsg){
        
    this.eldocument.getElementById(id);
    alert(this.el.id);
        
    this.isValid= function(){
            var 
    isValidtrue;

            if(
    isEmpty(this.el.value)){
                
    this.errorerrMsg;
                
    isValidfalse;
            }
            return 
    isValid;
        }
    };
    function 
    isValidEmailV(id,errMsg){
        
    this.eldocument.getElementById(id);
        
    this.isValid= function(){
            var 
    isValidtrue;
            if(!
    isValidEmail(this.el.value)){
                
    this.errorerrMsg;
                
    isValidfalse;
            }
            return 
    isValid;
        }
    };
    function 
    isIntV(id,errMsg){
        
    this.eldocument.getElementById(id);
        
    this.isValid= function(){
            var 
    isValidtrue;
            if(!
    isInt(this.el.value)){
                
    this.errorerrMsg;
                
    isValidfalse;
            }
            return 
    isValid;
        }
    };
    function 
    isUrlV(id,errMsg){
        
    this.eldocument.getElementById(id);
        
    this.isValid= function(){
            var 
    isValidtrue;
            if(
    this.el.value!='http://'){
                if(!
    isUrl(this.el.value)){
                    
    this.errorerrMsg;
                    
    isValidfalse;
                }
            }
            return 
    isValid;
        }
    };
    function 
    Validator() {
         var 
    validators= [];
        
    this.errors= [];
        
    this.values= {};
        
    this.add= function(objV){
            
    validators.push(objV);
        }
    this.isValid= function(){
            var 
    isValidFlagtrue;
            for(var 
    i=0lenvalidators.length;ilen;i++){
                if(!
    validators[i].isValid()){
                    
    this.errors.push({error:validators[i].error,el:validators[i].el});
                    
    isValidFlagfalse;
                }
                else{
                    
    this.values[validators[i].el.id]=validators[i].el.value;
                }
            }
            return 
    isValidFlag;
        }
    }
    function 
    setOpacity(el,value) {
        var 
    v= +value;
        
    el.style.opacity v/10;
        
    el.style.filter 'alpha(opacity=' v*10 ')';
    }
    function 
    preloadImgs(args) {
        for(var 
    n=0len arguments.length;n<len;n++) {
            
    preloadImg(arguments[n]);
        }    
        function 
    preloadImg(percorso) {
            var 
    temp=new Image();
            
    temp.src=percorso;
        }
    }
    function 
    resetStyle(target,bCol,col){
        var 
    inputListtarget.getElementsByTagName('input');
        for(var 
    i=0,len=inputList.length;i<len;i++){
            
    inputList.item(i).style.backgroundColor=bCol;
            
    inputList.item(i).style.color=col;
        }
        var 
    textListtarget.getElementsByTagName('textarea');
        for(var 
    i=0,len textList.length;i<len;i++){
            
    textList.item(i).style.backgroundColor=bCol;
            
    textList.item(i).style.color=col;
        }
    };
    function 
    Comment(){
        var 
    page'xhr/ajax-insert-comment.php?a=insert_comment';
        var 
    frmnull;
        var 
    c_savenull;
        var 
    frmHeight0;
        var 
    spacer30;
        var 
    noXhr'Il tuo browser non supporta questo script.';
        var 
    errMsgAuthor'L\'autore e\' obbligatorio.';
        var 
    errMsgEmail'Inserisci un indirizzo email valido.';
        var 
    errMsgUrl'Url del sito personale non valido.';
        var 
    errMsgComment'Il commento e\' obbligatorio.';
        var 
    errMsgCaptcha'Il codice di sicurezza e\' obbligatorio.';
        var 
    successfull'Grazie. Il tuo commento sara\' pubblicato a breve.';
        function 
    Response(xhr){}
        function 
    Request(values){}
        function 
    checkForm(e){
            var 
    validator = new Validator();
            
    //validator.add(new isIntV('pid','Something went wrong'));
            
    validator.add(new isEmptyV('author',errMsgAuthor));
            
    //validator.add(new isValidEmailV('email',errMsgEmail));
            //validator.add(new isUrlV('url',errMsgUrl));
            
    validator.add(new isEmptyV('comment',errMsgComment));
            
    //validator.add(new isEmptyV('security',errMsgCaptcha));
            
    cancelClick(e);
            if(!
    validator.isValid()){
                
    //resetStyle(frm,"#f4f4f4","#000000");
                
    showError(frm,validator);
            }
            else{
                
    Request(validator.values);
            }
            
    addEvent(window,'load',checkForm,false);
        }
        function 
    closeError(){
            
    c_save.disabledfalse;
            var 
    errorMsg= $('error-msg');
            
    _removeChild(frm,errorMsg);
        }
        function 
    showError(target,objV){
            
    c_save.disabledtrue;
            var 
    errorMsgbuildError();
            var 
    errorMsgBox_createElement('div',{id:'error-msg-box'});
            
    errorMsgBox.style.paddingTopMath.floor((frmHeight-spacer)/5)+'px';
            for(var 
    i=0,len=objV.errors.length;i<len;i++){
                var 
    wrapper_createElement('p',{});
                
    wrapper.className'wrapper-error';
                
    wrapper.appendChild(_createTextNode(objV.errors[i].error));
                
    errorMsgBox.appendChild(wrapper);
            }
            
    errorMsg.appendChild(errorMsgBox);
            
    objV.errors[0].el.style.backgroundColor'#FF0000';
            
    objV.errors[0].el.style.color'#FFFFFF';
            
    target.appendChild(errorMsg);
        }
        function 
    showLoader(){
            var 
    wrapper_createElement('div',{id:'loader'});
            
    setOpacity(wrapper,8);
            var 
    divHeightfrmHeight-spacer;
            
    wrapper.style.heightdivHeight+'px';
            
    wrapper.style.marginTopspacer+'px';
            
    frm.appendChild(wrapper);
        }
        function 
    commentBlock(){
            var 
    commentBlock_createElement('div',{id:'comment-block'});
            var 
    commentBlockIn_createElement('p',{});
            
    commentBlockIn.appendChild(_createTextNode(successfull));
            
    commentBlock.appendChild(commentBlockIn);
            var 
    wrapper= $('comment-wrapper');
            
    wrapper.replaceChild(commentBlock,frm);
        }
        function 
    buildError(){
            var 
    errorMsg_createElement('div',{id:'error-msg'});
            
    setOpacity(errorMsg,8);
            var 
    divHeightfrmHeight-spacer;
            
    errorMsg.style.heightdivHeight+'px';
            
    errorMsg.style.marginTopspacer+'px';
            var 
    xclose_createElement('p',{'id':'xclose'});
            var 
    xspan_createElement('span',{});
            
    xspan.appendChild(_createTextNode('X'));
            
    xclose.appendChild(xspan);
            
    errorMsg.appendChild(xclose);
            
    addEvent(xspan'click'closeErrorfalse);
            return 
    errorMsg;
        }
        function 
    showErrorServer(msg){
            var 
    errorMsgbuildError();
            var 
    errorMsgBox_createElement('div',{id:'error-msg-box'});
            
    errorMsgBox.style.paddingTopMath.floor((frmHeight-spacer)/5)+'px';
            var 
    wrapper_createElement('p',{});
            
    wrapper.className'wrapper-error';
            
    wrapper.appendChild(_createTextNode(msg));
            
    errorMsgBox.appendChild(wrapper);
            
    errorMsg.appendChild(errorMsgBox);
            
    _removeChild(frm,$('loader'));
            var 
    security= $('security');
            
    security.style.backgroundColor'#FF0000';
            
    security.style.color'#FFFFFF';
            
    frm.appendChild(errorMsg);
        }
        function 
    init(){
            if(!
    document.getElementById || !document.getElementsByTagName || !document.createTextNode){return;}
            
    frm= $('frm-comment');
            if(
    frm != null){
                
    preloadImgs('images/ajax-loader.gif');
                
    frmHeightfrm.offsetHeight;
                
    c_save= $('c-save');
                $(
    'author').focus();
                
    addEvent(frm'submit'checkFormfalse);
            }
        }
        
    init();
    }
    addEvent(window,'load',Comment,false);
    </script>
    </head>
    <body>
    <div id="container">
        <div id="content">
            <div id="comment-wrapper">
                <form action="www/index.php?u=new_comment" method="post" id="frm-comment">
                <h3 id="respond"><a name="nc124">Inserisciiltuocommento</a>
                </h3>
                <fieldset>
                <input name="c_post_id" type="hidden" value="124" id="pid"  />
                

    <label for="author">Nome:</label>
                <input name="c_author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1"  />
                </p>
                

    <label for="email">Indirizzoe-mail(nonverr&agrave;pubblicato):</label>
                <input name="c_email" type="text" title="email" value="" id="email" maxlength="50" tabindex="2"  />
                </p>
                

    <label for="url">SitoWeb:</label>
                <input name="c_url" type="text" title="url" value="http://" id="url" maxlength="50" tabindex="3"  />
                </p>
                

    <label for="comment">Commento:</label>
                <textarea name="c_comment" title="comment" id="comment" cols="30" rows="10" tabindex="4">
                </textarea>
                </p>
                <input id="c-save" name="check_insert" type="submit" value="send"  />
                </fieldset>
                

    [b]Nb.[/b]
    Devi avere i cookie abilitati per commentare l'articolo.
    I commenti saranno soggetti ad approvazione da parte dell'administrator.</p>
                </form>
            </div>
        </div>
        <div id="footer">

    Blogerino by Whisher</p></div>
    </div>
    </body>
    </html> 


    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  6. #6
    La funzione Comment è stata riportata correttamente o cosa?
    E' piena di errori negli apici!
    Considera anche che se il DOCTYPE è XHTML 1.0 strict se in un elemento "input" compaiono assieme name e id essi devono avere lo stesso valore.

  7. #7
    Originariamente inviato da H5N1_Aviaria
    La funzione Comment è stata riportata correttamente o cosa?
    E' piena di errori negli apici!
    Considera anche che se il DOCTYPE è XHTML 1.0 strict se in un elemento "input" compaiono assieme name e id essi devono avere lo stesso valore.
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  8. #8
    solitamente vale se si usano le label, quindi è più un vincolo WAI che W3 per XHTML ma se usi getElementById il nome può essere quello che ti pare, il motore DOM cercherà l'id senza alcun confronto con l'eventuale name.

    Quoto H5N1_Aviaria però quando dice che il codice, oltre ad essere troppo lungo (leggi: no tempo per debuggartelo), è pieno di errori di vario tipo, dalle regexp ad altro ancora.
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  9. #9
    Originariamente inviato da andr3a
    solitamente vale se si usano le label, quindi è più un vincolo WAI che W3 per XHTML ma se usi getElementById il nome può essere quello che ti pare, il motore DOM cercherà l'id senza alcun confronto con l'eventuale name.

    Quoto H5N1_Aviaria però quando dice che il codice, oltre ad essere troppo lungo (leggi: no tempo per debuggartelo), è pieno di errori di vario tipo, dalle regexp ad altro ancora.
    BB code le regex due sono le tue

    (leggi: no tempo per debuggartelo) capisco

    ad altro ancora.

    tipo mi faresti un favore se segnalassi gli errori
    almeno se ne commessi di grossolani

    riposto il codice in QUOTE
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
    <head>
    <title>Blogerino</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="css/main.css" />
    <script type="text/javascript">
    function _createElement(el,obj){
    var _el= document.createElement(el);
    for(var prop in obj){
    _el.setAttribute(prop,obj[prop]);
    }
    return _el;
    };
    function _createTextNode(text){
    return document.createTextNode(text);
    };
    function _removeChild(parent,child){
    if(child != null){
    parent.removeChild(child);
    }
    };
    function addEvent(elm, evType, fn, useCapture){
    if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
    } else if (elm.attachEvent) {
    var r = elm.attachEvent('on' + evType, fn);
    return r;
    } else {
    elm['on' + evType] = fn;
    }
    };
    function cancelClick(e){
    if (window.event){
    window.event.cancelBubble = true;
    window.event.returnValue = false;
    return;
    }
    if (e){
    e.stopPropagation();
    e.preventDefault();
    }
    };
    function $(){
    var elements = new Array();
    for (var i = 0, len = arguments.length; i < len; i++){
    var element = arguments[i];
    if (typeof element == 'string'){
    element = document.getElementById(element);
    }
    if (arguments.length == 1){
    return element;
    }
    elements.push(element);
    }
    return elements;
    };
    /* Validation */
    function isEmpty(val) {
    return !/\S/.test(val);
    }
    function isValidEmail(str) {
    // http://www.devpro.it/php4_id_2.html
    return Boolean(str.match(/^([a-z0-9]+[\._\-]?){1,3}([a-z0-9])*\@([a-z0-9]+[\.\-]?){1,3}([a-z0-9])*\.[a-z]{2,6}$/i));
    };
    function isInt(val) {
    return /^[1-9]\d{0,9}$/.test(val);
    };
    function isUrl(url){
    return /^(\w{2,6}:\/\/|www[0-9]*\.)\w+\.\w{2,6}/.test(url);
    };
    function isEmptyV(id,errMsg){
    this.el= document.getElementById(id);
    alert(this.el.id);
    this.isValid= function(){
    var isValid= true;

    if(isEmpty(this.el.value)){
    this.error= errMsg;
    isValid= false;
    }
    return isValid;
    }
    };
    function isValidEmailV(id,errMsg){
    this.el= document.getElementById(id);
    this.isValid= function(){
    var isValid= true;
    if(!isValidEmail(this.el.value)){
    this.error= errMsg;
    isValid= false;
    }
    return isValid;
    }
    };
    function isIntV(id,errMsg){
    this.el= document.getElementById(id);
    this.isValid= function(){
    var isValid= true;
    if(!isInt(this.el.value)){
    this.error= errMsg;
    isValid= false;
    }
    return isValid;
    }
    };
    function isUrlV(id,errMsg){
    this.el= document.getElementById(id);
    this.isValid= function(){
    var isValid= true;
    if(this.el.value!='http://'){
    if(!isUrl(this.el.value)){
    this.error= errMsg;
    isValid= false;
    }
    }
    return isValid;
    }
    };
    function Validator() {
    var validators= [];
    this.errors= [];
    this.values= {};
    this.add= function(objV){
    validators.push(objV);
    }
    this.isValid= function(){
    var isValidFlag= true;
    for(var i=0, len= validators.length;i< len;i++){
    if(!validators[i].isValid()){
    this.errors.push({error:validators[i].error,el:validators[i].el});
    isValidFlag= false;
    }
    else{
    this.values[validators[i].el.id]=validators[i].el.value;
    }
    }
    return isValidFlag;
    }
    }
    function setOpacity(el,value) {
    var v= +value;
    el.style.opacity = v/10;
    el.style.filter = 'alpha(opacity=' + v*10 + ')';
    }
    function preloadImgs(args) {
    for(var n=0, len = arguments.length;n<len;n++) {
    preloadImg(arguments[n]);
    }
    function preloadImg(percorso) {
    var temp=new Image();
    temp.src=percorso;
    }
    }
    function resetStyle(target,bCol,col){
    var inputList= target.getElementsByTagName('input');
    for(var i=0,len=inputList.length;i<len;i++){
    inputList.item(i).style.backgroundColor=bCol;
    inputList.item(i).style.color=col;
    }
    var textList= target.getElementsByTagName('textarea');
    for(var i=0,len = textList.length;i<len;i++){
    textList.item(i).style.backgroundColor=bCol;
    textList.item(i).style.color=col;
    }
    };
    function Comment(){
    var page= 'xhr/ajax-insert-comment.php?a=insert_comment';
    var frm= null;
    var c_save= null;
    var frmHeight= 0;
    var spacer= 30;
    var noXhr= 'Il tuo browser non supporta questo script.';
    var errMsgAuthor= 'L\'autore e\' obbligatorio.';
    var errMsgEmail= 'Inserisci un indirizzo email valido.';
    var errMsgUrl= 'Url del sito personale non valido.';
    var errMsgComment= 'Il commento e\' obbligatorio.';
    var errMsgCaptcha= 'Il codice di sicurezza e\' obbligatorio.';
    var successfull= 'Grazie. Il tuo commento sara\' pubblicato a breve.';
    function Response(xhr){}
    function Request(values){}
    function checkForm(e){
    var validator = new Validator();
    //validator.add(new isIntV('pid','Something went wrong'));
    validator.add(new isEmptyV('author',errMsgAuthor));
    //validator.add(new isValidEmailV('email',errMsgEmail));
    //validator.add(new isUrlV('url',errMsgUrl));
    validator.add(new isEmptyV('comment',errMsgComment));
    //validator.add(new isEmptyV('security',errMsgCaptcha));
    cancelClick(e);
    if(!validator.isValid()){
    //resetStyle(frm,"#f4f4f4","#000000");
    showError(frm,validator);
    }
    else{
    Request(validator.values);
    }
    addEvent(window,'load',checkForm,false);
    }
    function closeError(){
    c_save.disabled= false;
    var errorMsg= $('error-msg');
    _removeChild(frm,errorMsg);
    }
    function showError(target,objV){
    c_save.disabled= true;
    var errorMsg= buildError();
    var errorMsgBox= _createElement('div',{id:'error-msg-box'});
    errorMsgBox.style.paddingTop= Math.floor((frmHeight-spacer)/5)+'px';
    for(var i=0,len=objV.errors.length;i<len;i++){
    var wrapper= _createElement('p',{});
    wrapper.className= 'wrapper-error';
    wrapper.appendChild(_createTextNode(objV.errors[i].error));
    errorMsgBox.appendChild(wrapper);
    }
    errorMsg.appendChild(errorMsgBox);
    objV.errors[0].el.style.backgroundColor= '#FF0000';
    objV.errors[0].el.style.color= '#FFFFFF';
    target.appendChild(errorMsg);
    }
    function showLoader(){
    var wrapper= _createElement('div',{id:'loader'});
    setOpacity(wrapper,8);
    var divHeight= frmHeight-spacer;
    wrapper.style.height= divHeight+'px';
    wrapper.style.marginTop= spacer+'px';
    frm.appendChild(wrapper);
    }
    function commentBlock(){
    var commentBlock= _createElement('div',{id:'comment-block'});
    var commentBlockIn= _createElement('p',{});
    commentBlockIn.appendChild(_createTextNode(success full));
    commentBlock.appendChild(commentBlockIn);
    var wrapper= $('comment-wrapper');
    wrapper.replaceChild(commentBlock,frm);
    }
    function buildError(){
    var errorMsg= _createElement('div',{id:'error-msg'});
    setOpacity(errorMsg,8);
    var divHeight= frmHeight-spacer;
    errorMsg.style.height= divHeight+'px';
    errorMsg.style.marginTop= spacer+'px';
    var xclose= _createElement('p',{'id':'xclose'});
    var xspan= _createElement('span',{});
    xspan.appendChild(_createTextNode('X'));
    xclose.appendChild(xspan);
    errorMsg.appendChild(xclose);
    addEvent(xspan, 'click', closeError, false);
    return errorMsg;
    }
    function showErrorServer(msg){
    var errorMsg= buildError();
    var errorMsgBox= _createElement('div',{id:'error-msg-box'});
    errorMsgBox.style.paddingTop= Math.floor((frmHeight-spacer)/5)+'px';
    var wrapper= _createElement('p',{});
    wrapper.className= 'wrapper-error';
    wrapper.appendChild(_createTextNode(msg));
    errorMsgBox.appendChild(wrapper);
    errorMsg.appendChild(errorMsgBox);
    _removeChild(frm,$('loader'));
    var security= $('security');
    security.style.backgroundColor= '#FF0000';
    security.style.color= '#FFFFFF';
    frm.appendChild(errorMsg);
    }
    function init(){
    if(!document.getElementById || !document.getElementsByTagName || !document.createTextNode){return;}
    frm= $('frm-comment');
    if(frm != null){
    preloadImgs('images/ajax-loader.gif');
    frmHeight= frm.offsetHeight;
    c_save= $('c-save');
    $('author').focus();
    addEvent(frm, 'submit', checkForm, false);
    }
    }
    init();
    }
    addEvent(window,'load',Comment,false);
    </script>
    </head>
    <body>
    <div id="container">
    <div id="content">
    <div id="comment-wrapper">
    <form action="www/index.php?u=new_comment" method="post" id="frm-comment">
    <h3 id="respond"><a name="nc124">Inserisciiltuocommento</a>
    </h3>
    <fieldset>
    <input name="c_post_id" type="hidden" value="124" id="pid" />


    <label for="author">Nome:</label>
    <input name="c_author" type="text" title="author" value="" id="author" maxlength="25" tabindex="1" />
    </p>


    <label for="email">Indirizzoe-mail(nonverr&agrave;pubblicato):</label>
    <input name="c_email" type="text" title="email" value="" id="email" maxlength="50" tabindex="2" />
    </p>


    <label for="url">SitoWeb:</label>
    <input name="c_url" type="text" title="url" value="http://" id="url" maxlength="50" tabindex="3" />
    </p>


    <label for="comment">Commento:</label>
    <textarea name="c_comment" title="comment" id="comment" cols="30" rows="10" tabindex="4">
    </textarea>
    </p>
    <input id="c-save" name="check_insert" type="submit" value="send" />
    </fieldset>


    Nb.
    Devi avere i cookie abilitati per commentare l'articolo.
    I commenti saranno soggetti ad approvazione da parte dell'administrator.</p>
    </form>
    </div>
    </div>
    <div id="footer">

    Blogerino by Whisher</p></div>
    </div>
    </body>
    </html>

    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  10. #10
    Originariamente inviato da whisher
    BB code le regex due sono le tue
    a parte che alcune le ho aggiornate su devpro ... ma se le scrivi dentro il tag PHP che si mangia gli slashes è inevitabile trovare errori
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

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.