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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

links in table

Status
Not open for further replies.

olegflute

Technical User
Sep 10, 2003
11
AU
Can somebody help. When I click a link it should open a page but I don't want to use frames as I find it inconvinient. I 'd like to use just table layout. My question is - how can I load page in particular cell of the table. For example I have links in the left cell and pages loading to the right cell?
 
Yup - place an IFRAME in your table cell, and then set the src of it.. Something like:

Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
	function loadDoc(URL)
	{
		document.getElementById('myFrame').src = URL;
	}
//-->
</SCRIPT>
</HEAD>
<BODY>

<TABLE WIDTH=&quot;75%&quot; BORDER=&quot;1&quot;>
<TR>
	<TD>blah</TD>
	<TD>waffle</TD>
	<TD>drone</TD>
</TR>
<TR>
	<TD>Click <A HREF=&quot;javascript:loadDoc('[URL unfurl="true"]http://www.google.co.uk/');&quot;>here</A>[/URL] to load Google in the middle</TD>
	<TD><IFRAME SRC=&quot;&quot; ID=&quot;myFrame&quot;></IFRAME></TD>
	<TD>Click <A HREF=&quot;javascript:loadDoc('[URL unfurl="true"]http://www.yahoo.co.uk/');&quot;>here</A>[/URL] to load Yahoo! in the middle</TD>
</TR>
<TR>
	<TD>123</TD>
	<TD>456</TD>
	<TD>789</TD>
</TR>
</TABLE>

</BODY>
</HTML>

Hope this helps!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top