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

    errore validazione, carattere non corretto

    si tratta di una funzione standard per le pop-up (in un file esterno)

    function Apripop(x){
    var popup = window.open(x, "fotox", "toolbar=no, menubar=no, scrollbars=no, resizable=no, width=620, height=500");
    }

    la usa chiamata nel documento mi da questo errore:

    Line 46, column 38: an attribute value must be a literal unless it contains only name characters

    <a href="javascript:;" onclick=Apripop("foto/1.html")><img src="foto/a1.jpg" alt

    You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.

    suggerimenti?

  2. #2
    in che punto preciso ti segnala l'errore? (il segno rosso)

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2001
    Messaggi
    21,188
    Ci sono due errori.

    1. nei parametri di window.open() non sono ammessi spazi (alcuni browser non funzionano se trovano spazi)

    2. mancano le virgolette (o apici) attorno al valore dell'evento:
    <a href="#" onclick="Apripop('foto/1.html'); return false;"><img src="foto/a1.jpg" alt ....

    Addirittura mettici un return false; e metti un parametro valido nell'href.
    Nuova politica di maggiore severita` sui titoli delle discussioni: (ri)leggete il regolamento
    No domande tecniche in messaggi privati

  4. #4
    thkz, gentilissimo-

    tutto ok ora

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.