JScript Coding Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • WiredGuy
    Pounding Googlebot
    • Aug 2002
    • 34512

    #1

    JScript Coding Question

    Ok, I'm a bit stumped on this, so hopefully someone can help:

    Document A has an Invisible Frame and the rest of the page is visible, so: DOC 1 -> Frame A (hidden) and Frame B (full)

    On Document 1 I have 2 Jscript variables (on the page that defines the frames). On Frame B I need to access the data stored in these 2 variables. How do I reference that data, I thought it would be top.window.VAR1 and top.window.VAR2 but I keep getting undefined.

    Anyone have an idea?

    Thanks
    WG
    I play with Google.
  • hybrid
    So Fucking Banned
    • Jul 2002
    • 3253

    #2
    www.gurusnetwork.com

    Every single time I have a question or a problem, this is the place to find solutions. Seriously, almost everyone there knows their shit.

    Comment

    • Easton
      Too lazy to set a custom title
      • Sep 2002
      • 9825

      #3
      i'm smashed outta my mind... time for bed guys!
      New models booked and shot every week... MILFs, pornstars and teens. Girls for every niche and project.
      Looking for high-quality affordable exclusive content? Check me out at Easton Content for all the details.

      Comment

      • LuSiD
        Confirmed User
        • Dec 2002
        • 434

        #4
        Originally posted by WiredGuy
        Ok, I'm a bit stumped on this, so hopefully someone can help:

        Document A has an Invisible Frame and the rest of the page is visible, so: DOC 1 -> Frame A (hidden) and Frame B (full)

        On Document 1 I have 2 Jscript variables (on the page that defines the frames). On Frame B I need to access the data stored in these 2 variables. How do I reference that data, I thought it would be top.window.VAR1 and top.window.VAR2 but I keep getting undefined.

        Anyone have an idea?

        Thanks
        WG
        Might want to try top.window.document.VAR1 and top.window.document.VAR2

        If that doesn't work, then no clue. But goodluck.
        I bought a dog the other day... I named him Stay. It's fun to call him... "Come here, Stay! Come here, Stay!" He went insane. Now he just ignores me and keeps typing.

        Comment

        • NetRodent
          Confirmed User
          • Jan 2002
          • 3985

          #5
          Are all of the documents on the same domain? If the frames call documents on other domains there is no direct way to access the variables. The only way to communicate between two frames on different hosts is to pass data via the window.status variable.
          "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
          --H.L. Mencken

          Comment

          • WiredGuy
            Pounding Googlebot
            • Aug 2002
            • 34512

            #6
            Originally posted by NetRodent
            Are all of the documents on the same domain? If the frames call documents on other domains there is no direct way to access the variables. The only way to communicate between two frames on different hosts is to pass data via the window.status variable.
            Yes, both all documents (main page, hidden frame and visible frame) are all on the same domain. The main page calls two frames, the invisible one is called /blank.html and the visible one is /content/index.html

            How do you use the window.status variable to pass data since I keep getting undefined errors. Any other suggestions will really help.

            Thanks everyone.
            WG
            I play with Google.

            Comment

            • whee
              Confirmed User
              • Sep 2002
              • 1375

              #7
              Name the frames and collect the vals from the name instead
              http://www.nightstation.com

              Comment

              • Cogitator
                Confirmed User
                • Feb 2002
                • 672

                #8
                Frames are treated like windows in code. If the frames are inside another frame, your code won't work. You might want to try "window.parent.VAR1".
                - this space intentionally left blank -

                Comment

                • WiredGuy
                  Pounding Googlebot
                  • Aug 2002
                  • 34512

                  #9
                  Originally posted by whee
                  Name the frames and collect the vals from the name instead
                  The data is stored in the root page, the one that calls the 2 frames. I can't move the data into the framed pages because this is dynamically generated.

                  WG
                  I play with Google.

                  Comment

                  Working...