Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

frames 1

Status
Not open for further replies.

megabyte214

Programmer
Nov 7, 2001
40
US
Hello,
I'm trying to get a reference to an applet from a frame. here is the frameset:
Code:
<frameset id=&quot;MainFrame&quot; rows=&quot;120,*,12&quot; border=&quot;0&quot; framespacing=&quot;0&quot; frameBorder=&quot;0&quot;>
		<frame id=&quot;Header&quot; name=&quot;Header&quot; src=&quot;MainMenu.aspx&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; noresize>
		<frameset cols=&quot;280,*&quot; 
			<frame id=&quot;Tree&quot; name=&quot;Tree&quot; src=&quot;SysHierarchy.aspx&quot; scrolling=&quot;no&quot; NORESIZE marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
			<frameset id=&quot;DataView&quot; rows=&quot;29px,*&quot;>
				<frame id=&quot;DisplayName&quot; name=&quot;DisplayName&quot; src=&quot;DisplayName.aspx&quot; scrolling=&quot;no&quot; NORESIZE>
				<frame id=&quot;Data&quot; name=&quot;Data&quot; src=&quot;Default.aspx&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;auto&quot; noresize>
			</frameset>
		</frameset>
		<frame id=&quot;Footer&quot; name=&quot;Footer&quot; src=&quot;Footer.aspx&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; noresize>
		<noframes>
			<body bgcolor=&quot;#FFFFFF&quot;>
				Your browser doesn't support Frames. </body>
		</noframes>
	</frameset>
I was in the data frame and I want to get the applet called &quot;myJTree&quot; that is in the Tree Frame. The applet &quot;myJTree&quot;, is in a div called &quot;myJTreeDiv&quot; inside a form called &quot;myJTreeForm&quot; inside the &quot;Tree&quot; Frame.
I thought that this javascript would work:
Code:
<script language = &quot;javascript&quot;>
var app = top.frames.Tree.applets.myJTree;
</script>

any help would be great! Thanks,
mega
 
try giving it an id, say id=myJTree

then all you need is is top.getElementById(&quot;myJTree&quot;)
(or maybe top.Tree.getElementById(&quot;myJTree&quot;))
 
NeverMoor,
Thanks, I just got home from work but I will try it in the morning.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top