468,106 Members | 1,536 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,106 developers. It's quick & easy.

Problem with anchor navigation in frames

Could somebody help me ? I believe this might be elementary, but I am not much familiar with HTML .In my page i have two frames. I have a number of anchor tags in right frame. Every anchor tag in left side is associated to some text and one anchor as header in right frame. When I click in left anchor tag it should focus the associated content in the right frame.
Below is main HTML page partly.
Expand|Select|Wrap|Line Numbers
  1. <frameset  cols="40%,60%">
  2.     <frame src="frame1.html" id="leftFrame1" name="leftFrame1">
  3.     <frame src="frame2.html" id="rightFrame1" name="rightFrame1">
  4. </frameset>
  5.  
And below is left frame's ( frame1.html) content.
Expand|Select|Wrap|Line Numbers
  1.  <BODY>
  2. <A HREF="#a1" target="rightFrame1">tag1</A>
  3. <A HREF="#a2" target="rightFrame1">tag2</A>
  4.  </BODY>
  5.  
And right frame's ( frame2.html) content.
Expand|Select|Wrap|Line Numbers
  1. <BODY>
  2.  <A HREF="" id="a1" name="a1">tag1</A>
  3.  <TABLE>
  4.  <TR>
  5.      <TD>1</TD>
  6.      <TD>2</TD>
  7.  </TR>
  8.  <TR>
  9.      <TD>3</TD>
  10.      <TD>4</TD>
  11.  </TR>
  12.  <TR>
  13.      <TD>5</TD>
  14.      <TD>6</TD>
  15.  </TR>
  16.  <TR>
  17.      <TD>7</TD>
  18.      <TD>8</TD>
  19.  </TR>
  20.   <TR>
  21.      <TD>7</TD>
  22.      <TD>8</TD>
  23.  </TR>
  24.  <TR>
  25.      <TD>7</TD>
  26.      <TD>8</TD>
  27.  </TR>
  28.   <TR>
  29.      <TD>7</TD>
  30.      <TD>8</TD>
  31.  </TR>
  32.  <TR>
  33.      <TD>7</TD>
  34.      <TD>8</TD>
  35.  </TR>
  36.   <TR>
  37.      <TD>7</TD>
  38.      <TD>8</TD>
  39.  </TR>
  40.  <TR>
  41.      <TD>7</TD>
  42.      <TD>8</TD>
  43.  </TR>
  44.   <TR>
  45.      <TD>7</TD>
  46.      <TD>8</TD>
  47.  </TR>
  48.  <TR>
  49.      <TD>7</TD>
  50.      <TD>8</TD>
  51.  </TR>
  52.   <TR>
  53.      <TD>7</TD>
  54.      <TD>8</TD>
  55.  </TR>
  56.  <TR>
  57.      <TD>7</TD>
  58.      <TD>8</TD>
  59.  </TR>
  60.   <TR>
  61.      <TD>7</TD>
  62.      <TD>8</TD>
  63.  </TR>
  64.  <TR>
  65.      <TD>7</TD>
  66.      <TD>8</TD>
  67.  </TR>
  68.   <TR>
  69.      <TD>7</TD>
  70.      <TD>8</TD>
  71.  </TR>
  72.  <TR>
  73.      <TD>7</TD>
  74.      <TD>8</TD>
  75.  </TR>
  76.   <TR>
  77.      <TD>7</TD>
  78.      <TD>8</TD>
  79.  </TR>
  80.  <TR>
  81.      <TD>7</TD>
  82.      <TD>8</TD>
  83.  </TR>
  84.   <TR>
  85.      <TD>7</TD>
  86.      <TD>8</TD>
  87.  </TR>
  88.  <TR>
  89.      <TD>7</TD>
  90.      <TD>8</TD>
  91.  </TR>
  92.   <TR>
  93.      <TD>7</TD>
  94.      <TD>8</TD>
  95.  </TR>
  96.  <TR>
  97.      <TD>7</TD>
  98.      <TD>8</TD>
  99.  </TR>
  100.   <TR>
  101.      <TD>7</TD>
  102.      <TD>8</TD>
  103.  </TR>
  104.  <TR>
  105.      <TD>7</TD>
  106.      <TD>8</TD>
  107.  </TR>
  108.   <TR>
  109.      <TD>7</TD>
  110.      <TD>8</TD>
  111.  </TR>
  112.  <TR>
  113.      <TD>7</TD>
  114.      <TD>8</TD>
  115.  </TR>
  116.   <TR>
  117.      <TD>7</TD>
  118.      <TD>8</TD>
  119.  </TR>
  120.  <TR>
  121.      <TD>7</TD>
  122.      <TD>8</TD>
  123.  </TR>
  124.   <TR>
  125.      <TD>7</TD>
  126.      <TD>8</TD>
  127.  </TR>
  128.  <TR>
  129.      <TD>7</TD>
  130.      <TD>8</TD>
  131.  </TR>
  132.   <TR>
  133.      <TD>7</TD>
  134.      <TD>8</TD>
  135.  </TR>
  136.  <TR>
  137.      <TD>7</TD>
  138.      <TD>8</TD>
  139.  </TR>
  140.   <TR>
  141.      <TD>7</TD>
  142.      <TD>8</TD>
  143.  </TR>
  144.  <TR>
  145.      <TD>7</TD>
  146.      <TD>8</TD>
  147.  </TR>
  148.   <TR>
  149.      <TD>7</TD>
  150.      <TD>8</TD>
  151.  </TR>
  152.  <TR>
  153.      <TD>7</TD>
  154.      <TD>8</TD>
  155.  </TR>
  156.   <TR>
  157.      <TD>7</TD>
  158.      <TD>8</TD>
  159.  </TR>
  160.  
  161.  </TABLE>
  162. <A HREF="" id="a2" name="a2">tag2</A>
  163.  </BODY>
  164.  
In simple when I click link in left frame (i.e. link tag2 ), right frame should display tag2 on screen. And anchor's in right frame is only serve as heading's and has no target. If it is necessary javascript also I could use, like using window.scrollTo ( I am not sure) etc.
Sep 12 '07 #1
1 1617
drhowarddrfine
7,435 Expert 4TB
This cannot be done using html. You need to ask on the javascript board.
Sep 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Theodore A. Jencks | last post: by
reply views Thread by Jason Rodman | last post: by
4 posts views Thread by Sandy.Pittendrigh | last post: by
10 posts views Thread by elibol | last post: by
8 posts views Thread by knoxautoguy | last post: by
13 posts views Thread by Giggle Girl | last post: by
18 posts views Thread by len.hartley | last post: by
2 posts views Thread by gvrajkumar | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.