Visualizzazione dei risultati da 1 a 4 su 4

Discussione: scripting con frame

  1. #1

    scripting con frame

    Ciao ragazzi. Ho sotto mano il libro:
    JavaScript, The Definitive Guide
    che mi lascia alquanto perplessa.

    vorrei solo sapere dove scrivere il mio script...

    Voi cosa capite da questi 2 paragrafi?!?!

    Frame properties overwrite others

    This is a bug [...]. When a window contains named frames, the references to those frames are stored in properties of the window. JavaScript apparently allocates the first few property "slots" of the window object for these frames. If you create other properties of the Window object before the frames are created, and if the window is a newly created one, then these properties may take up those first property "slots." Later, when the frame references are stored in those slots, the value of your properties will be overwritten.

    This situation occurs only in a couple of specific cases. The first is when you have a <SCRIPT> tag that sets properties before a <FRAMESET> tag that defines frames . (Doing this is probably a poor programming practice, by the way.) The second is when you have a script that sets properties in a window and then generates the frames itself by explicitly outputting the necessary <FRAMESET> and <FRAME> tags.

    A related bug that serves to make this bug even more mysterious is that frame properties of a Window object are not detected by a for/in loop until they have actually been used once by a script!

    ********************************

    Scripts that appear after a <FRAMESET> tag in a document will not be executed . This is not actually a bug, but a fact of the JavaScript architecture. Scripts may appear in the <HEAD> or <BODY> of a document. An HTML file that defines a frameset has a head--that portion that appears before the frameset--but does not have a body; the frameset is a substitute for the document body, and JavaScript rules do not allow scripts within frameset definitions .

    JavaScript does allow scripts before the beginning of a frameset, but unless you have a good reason to do this, it probably isn't a good idea.


    e... altra domanda....

    che differenza c'è tra impostare onload per i frame o per i frameset?!

  2. #2
    L'inglese non è la mia passione...quindi ti passo un link che spero possa aiutarti

    http://pro.html.it/articoli/id_305/idcat_11/pro.html


  3. #3
    Grazie, ma non era proprio quello che volevo sapere..
    qualche altra idea!?

    [[ frame attraverso il dom! ]]

  4. #4
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    basta una sola discussione!
    continua qui

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.