GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   JScript Coding Question (https://gfy.com/showthread.php?t=113782)

WiredGuy 03-07-2003 04:14 AM

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

hybrid 03-07-2003 04:29 AM

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.

Easton 03-07-2003 05:07 AM

i'm smashed outta my mind... time for bed guys!

LuSiD 03-07-2003 05:54 AM

Quote:

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. :thumbsup

NetRodent 03-07-2003 09:23 AM

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.

WiredGuy 03-07-2003 12:57 PM

Quote:

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

whee 03-07-2003 02:13 PM

Name the frames and collect the vals from the name instead

Cogitator 03-07-2003 02:17 PM

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".

WiredGuy 03-07-2003 03:36 PM

Quote:

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


All times are GMT -7. The time now is 04:27 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123