Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    1,202

    Script non funzionante con Internet Explorer

    Provando questa funzione non ho problemi su Firefox e altri browser, l'unico che si lamenta è Internet Explorer...

    Codice PHP:
    function addFoxboardCheck() {
        var 
    number document.forms['addFoxboard'].number.value;
        var 
    actionPage "../manageFoxboards";
        var 
    ok "true";

        
    // number is empty or undefined
        
    if ((number == "") || (number == undefined)) {
            
    ok "false";
            
    alert('You must insert a value');
            }

        
    // number must be a numeric
        
    else {
            for (
    i=0i<number.lengthi++){
                     if (
    number.charCodeAt(i)<48 || number.charCodeAt(i)>57){
                    
    ok "false";
                    break;
                }
            }
            if (
    ok == "false"alert('You must insert only numeric values');
        }

        if (
    ok == "true"){
            
    document.forms['addFoxboard'].action actionPage;
            
    document.forms['addFoxboard'].submit();
        }

    Che mi dà errore nelle ultime due istruzioni.
    Come mai?
    Debian GNU/Linux sid
    Publishing a theory should not be the end of one's conversation with the universe, but the beginning. (Eric S. Raymond)
    Kernel 2.6.14-ck1

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    1,202
    L'errore che mi dà è "proprietà o metodo non supportati dall'oggetto", nella riga del submit()... :rollo:

    Non capisco
    Debian GNU/Linux sid
    Publishing a theory should not be the end of one's conversation with the universe, but the beginning. (Eric S. Raymond)
    Kernel 2.6.14-ck1

  3. #3
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    hai un elemento con name="submit"? cambia name

  4. #4
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    1,202
    Eh già (per la precisione name=action), risolto grazie
    Debian GNU/Linux sid
    Publishing a theory should not be the end of one's conversation with the universe, but the beginning. (Eric S. Raymond)
    Kernel 2.6.14-ck1

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.