gn and gs will be visible if you Watch the variable 'window.parent', as a global variable IS a property of 'window'. Global variables and 'window' properties are the same thing.
-- S.Cinos JavaScript Developer at Tuenti.com 2011/1/8 John J Barton <[email protected]>: > > > On Jan 7, 10:40 pm, Woody <[email protected]> wrote: >> Sorry, I don't understand either of your answers. Adding window.parent >> as a new Watch expression shows all the properties of the window, but >> not any of the global variables. Typing dir(parent) or dir(window) in >> the DOM command line gives "ReferenceError: dir is not defined >> { message="dir is not defined", lineNumber=1, more...}". >> >> In any case, even if these methods worked, they are far too cumbersome >> to be useful. What is needed is for the global variables to appear >> automatically in the Watch window, or at least an object that expands >> to showing the global objects. >> >> Here is a sample HTML page with some global variables gn and gs. Can >> you give me step-by-step directions for viewing their values if I am >> at a Javascript breakpoint in frame L? > > If you are on a breakpoint in code in frame L, then the global > variable gn and gs are not visible. They are global in the main page, > they are not global in the code in frame L. To verify this you can > set gn="hello" then in L.html add a script tag that has alert(gn). > > I believe frame and iframe are similar: > https://developer.mozilla.org/en/HTML/Element/iframe#Scripting > > jjb > >> >> <html> >> <head> >> <title>My Page</title> >> <script> >> var gn; >> var gs=[]; >> </script> >> </head> >> <frameset rows="400,*"> >> <frameset cols="400,*"> >> <frame src="B.html"> >> <frame src="S.html"> >> </frameset> >> <frameset cols="550"> >> <frame src="L.html"> >> </frameset> >> <noframes> >> You need to have a more current browser to use this player. >> </noframes> >> </frameset> >> </html> > > -- > You received this message because you are subscribed to the Google Groups > "Firebug" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/firebug?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
