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

    Errori di sintassi in tutte le pagine

    Ciao a tutti,
    sto controllando le pagine ASP di un piccolo sito e-commerce e tutte le pagine hanno un errore di sintassi diverso, "carattere 1", "codice 0.

    Es. index.asp > linea 2393 / ma questa pagina ne ha molte meno di righe...com'è possibile???

    Grazie,
    Elisab

  2. #2
    controlla se nei campi ci sono apici

    nel caso devi fare il replace
    Ci sedemmo dalla parte del torto visto che tutti gli altri posti erano occupati."
    [Bertolt Brecht]

  3. #3

    esempio della pagina chisiamo.asp

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript">

    var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
    var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

    if (document.getElementById){ //DynamicDrive.com change
    document.write('<style type="text/css">\n')
    document.write('.submenu{display: none;}\n')
    document.write('</style>\n')
    }

    function SwitchMenu(obj){
    if(document.getElementById){
    var el = document.getElementById(obj);
    var ar = document.getElementById("masterdiv").getElementsBy TagName("span"); //DynamicDrive.com change
    if(el.style.display != "block"){ //DynamicDrive.com change
    for (var i=0; i<ar.length; i++){
    if (ar[i].className=="submenu") //DynamicDrive.com change
    ar[i].style.display = "none";
    }
    el.style.display = "block";
    }else{
    el.style.display = "none";
    }
    }
    }

    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = "";
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
    offset += search.length
    end = document.cookie.indexOf(";", offset);
    if (end == -1) end = document.cookie.length;
    returnvalue=unescape(document.cookie.substring(off set, end))
    }
    }
    return returnvalue;
    }

    function onloadfunction(){
    if (persistmenu=="yes"){
    var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
    var cookievalue=get_cookie(cookiename)
    if (cookievalue!="")
    document.getElementById(cookievalue).style.display ="block"
    }
    }

    function savemenustate(){
    var inc=1, blockid=""
    while (document.getElementById("sub"+inc)){
    if (document.getElementById("sub"+inc).style.display= ="block"){
    blockid="sub"+inc
    break
    }
    inc++
    }
    var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
    var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
    document.cookie=cookiename+"="+cookievalue
    }

    if (window.addEventListener)
    window.addEventListener("load", onloadfunction, false)
    else if (window.attachEvent)
    window.attachEvent("onload", onloadfunction)
    else if (document.getElementById)
    window.onload=onloadfunction

    if (persistmenu=="yes" && document.getElementById)
    window.onunload=savemenustate

    </script>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Titolo della Pagina</title>
    <link href="../fogliostile.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    -->
    </style></head>
    <body>
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td></td>
    <td width="917" align="left" valign="top"><table width="917" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="126" valign="top"></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <td height="10">[img]../img/spcr_bianco.gif[/img]</td>
    </tr>
    <tr>
    <td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="206" height="100%" valign="top" background="../img/spcr_verde_chiaro.gif"></td>
    <td width="10">[img]../img/spcr_bianco.gif[/img]</td>
    <td width="522" valign="top"><table width="522" border="0" cellspacing="0" cellpadding="0">

    <tr>
    <td><table width="165" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="16"><table width="522" height="16" border="0" cellpadding="0" cellspacing="0">
    <tr background="../img/sfondomenu.jpg">
    <td width="15" align="left" valign="top">[img]../img/smusso_menu_sx_arancio2.gif[/img]</td>
    <td height="16" background="../img/sfondomenu2.jpg" class="titoli_verdini"></td>
    <td width="15" align="right" valign="top" background="../img/sfondomenu.jpg">[img]../img/smusso_menu_dx_arancio2.gif[/img]</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td valign="top"><table width="522" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="1" background="../img/spcr_grigio.gif">[img]../img/spcr_grigio.gif[/img]</td>
    <td><table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
    <td class="testo_grigio>Testo testo</td></tr>
    </table></td>
    <td width="1" background="../img/spcr_grigio.gif">[img]../img/spcr_grigio.gif[/img]</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td background="../img/spcr_grigio.gif">[img]../img/spcr_grigio.gif[/img]</td>
    </tr>
    </table></td>
    </tr>

    </table></td>
    <td width="10">[img]../img/spcr_bianco.gif[/img]</td>
    <td align="right" valign="top"></td>
    </tr>
    </table></td>
    </tr>

    <tr>
    <td></td>
    </tr>

    </table></td>
    <td></td>
    </tr>
    </table>
    </body>
    </html>
    Elisab

  4. #4
    hai contato gli include
    Ci sedemmo dalla parte del torto visto che tutti gli altri posti erano occupati."
    [Bertolt Brecht]

  5. #5
    ossia? scusa ma nn sono una programmatrice e non riesco a capire bene...
    Elisab

  6. #6
    nello script ci sono degli
    >


    queste sono porzioni che stai inserendo nel tuo script........ne consegue che il numero totale delle righe deve considere anche il codice costituente tali file
    Ci sedemmo dalla parte del torto visto che tutti gli altri posti erano occupati."
    [Bertolt Brecht]

  7. #7
    ah ok ora capisco...provo ad effettuare un controllo subito grazie!
    Elisab

  8. #8
    contanto le righe con gli include inclusi ho scoperto che l'errore è sempre a questa riga dove c'è scritto:

    if (document.getElementById){
    Elisab

  9. #9
    posta tutta la condizione if così non si capisce
    Ci sedemmo dalla parte del torto visto che tutti gli altri posti erano occupati."
    [Bertolt Brecht]

  10. #10
    if (document.getElementById){
    document.write('<style type="text/css">\n')
    document.write('.submenu{display: none;}\n')
    document.write('</style>\n')
    }
    Elisab

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 © 2026 vBulletin Solutions, Inc. All rights reserved.