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

    Significato errore :"xx" non definito

    Ho una variabile , in una pagina con javascript

    Quando lancio la pagina mi compare :
    Errore durante l'esecuzione
    Errore 'nomevar' non è definito


    Che significa ?
    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  2. #2
    Utente di HTML.it L'avatar di oronze
    Registrato dal
    Jun 2001
    Messaggi
    3,543
    posta tutto il js...

    No ai layout tabellari!

    Insulto libero: http://forum.html.it/forum/showthread.php?s=&postid=12524872#post12524872

  3. #3
    Originariamente inviato da oronze
    posta tutto il js...
    Ok, .. spero che non mi "sgridino" .. il codice era in un post in javascript , poi sembrava voler volgere a php e quindi ho psotato in php , ora invece siamo tornati alla soluzione javascript solo che c'è sto errore e non capisco dove sbaglio
    Confido nella bontà dei moderatori :quote:


    <html>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <head>

    <script language="text/javascript">
    <!--//
    var indirizzo = window.location.href;
    var to_frame = "";
    if (indirizzo == 'http://www.mysite.com/') {
    to_frame = "http://www.mysite.com/index_norm.php";
    }
    else if (indirizzo == 'http://gest@mysite.com/') {
    to_frame= "http://www.mysite.com/gest/";
    }
    else if (indirizzo == 'http://biella@mysite.com/') {
    to_frame= "http://www.mysite.com/biella/";
    }
    else {
    to_frame= "http://www.mysite.com/idex_norm.php";
    }
    var frame_direct= "<FRAMESET ROWS=\"*,0\" FRAMEBORDER=\"0\" BORDER=\"0\" FRAMESPACING=\"0\"><frame src=\""+to_frame+"\" noresize></FRAMESET><noframes></noframes>";
    //-->
    </script>
    </head>
    <body>
    <script type="text/javascript">document.write(frame_direct);</script>
    </body>
    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  4. #4
    Utente di HTML.it L'avatar di oronze
    Registrato dal
    Jun 2001
    Messaggi
    3,543
    che errore da? a me non ne daqual'è la var non definita?

    No ai layout tabellari!

    Insulto libero: http://forum.html.it/forum/showthread.php?s=&postid=12524872#post12524872

  5. #5
    Originariamente inviato da oronze
    che errore da? a me non ne daqual'è la var non definita?
    ? la var non definita è frame_direct

    l'hai provato in locale o online ??
    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  6. #6
    Utente di HTML.it
    Registrato dal
    Dec 2001
    Messaggi
    3,259
    proviamo così?

    codice:
    <html> 
    <title>Documento senza titolo</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <head> 
    
    <script language="text/javascript"> 
    <!--// 
    var indirizzo = window.location.href; 
    var to_frame="" 
    var frame_direct=""
    if (indirizzo == 'http://www.mysite.com/') { 
    to_frame = "http://www.mysite.com/index_norm.php"; 
    } 
    else if (indirizzo == 'http://gest@mysite.com/') { 
    to_frame= "http://www.mysite.com/gest/"; 
    } 
    else if (indirizzo == 'http://biella@mysite.com/') { 
    to_frame= "http://www.mysite.com/biella/"; 
    } 
    else { 
    to_frame= "http://www.mysite.com/idex_norm.php"; 
    } 
    frame_direct= "<FRAMESET ROWS=\"*,0\" FRAMEBORDER=\"0\" BORDER=\"0\" FRAMESPACING=\"0\"><frame src=\""+to_frame+"\" noresize></FRAMESET><noframes></noframes>"; 
    document.write(frame_direct)
    //--> 
    </script> 
    </head> 
    <body> 
    </body>

  7. #7
    così non dà errore, ma non funge cmq ?



    qualsiasi sia l'indirizzo inserito nella barra viene aperto nel frame
    sempre http://www.mysite.com ??
    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

  8. #8
    Utente di HTML.it
    Registrato dal
    Jan 2002
    Messaggi
    633
    codice:
    <html> 
    <head><title>Documento senza titolo</title> 
    
    <script type="text/javascript"> 
    //<!-- 
    
    
    var indirizzo = window.location.href; 
    var to_frame = ""; 
    
    
    if (indirizzo == 'http://www.mysite.com/') { 
    to_frame = "http://www.mysite.com/index_norm.php"; 
    } 
    else if (indirizzo == 'http://gest@mysite.com/') { 
    to_frame= "http://www.mysite.com/gest/"; 
    } 
    else if (indirizzo == 'http://biella@mysite.com/') { 
    to_frame= "http://www.mysite.com/biella/"; 
    } 
    else { 
    to_frame= "http://www.mysite.com/idex_norm.php"; 
    } 
    
    var frame_direct= "<FRAMESET ROWS='*,0' FRAMEBORDER='0' BORDER='0' FRAMESPACING='0'><frame src='"+to_frame+"' noresize></FRAMESET><noframes></noframes>"; 
    
    //--> 
    </script> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    
    </head> 
    
    
    <script type="text/javascript">document.write(frame_direct);</script>
    
    
    </html>
    c'erano degli errori come language="text/javascript" o il title fuori dall'head..o la presenza del body, nonostante il frameset (dinamico)...
    vedi se ti va bene.
    ciauz
    Alcuni miei articoli in PRO.HTML.IT: JavaScript | DHTML | DOM
    Sviluppo : wedev | forum

  9. #9
    P.E.R.F.E.T.T.O. !!

    Grazie mille è perfetto !

    [°_°] The Web Styler Project [°_°]
    :.:Classifica Spettacolare :.:
    :-:Partecipa :-: GUADAGNA SCRIVENDO ARTICOLI !! fino a 2,5 crediti per parola

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.