HTML frames

I've three frames in an html file aligned top, left and right. I've three links on the left frame and want to change the html file on the right frame on the click event of the links on the left frame. I've succedded in getting the index of the link clicked but can't replace the file in the right frame.
How can I replace the file.

Thanks in advance.
Who is Participating?
sgopalanConnect With a Mentor Commented:
in ur frames html, each frame wuld have been given a name. if not do it. then in the link html add target="framename" that way, the link opens up in a frame with name 'framename'.
m_adilAuthor Commented:
>> then in the link html add target="framename"

can't understand this

for your refference here is the frame file

<Frameset rows="20%,80%" frameSpacing=0>
<Frame name="topFrame" src="top.htm"  noresize scrolling=no   frameborder=0 bordercolor=#778899>

<Frameset cols="20%,80%" frameSpacing=0>
<Frame name="leftFrame" src="menu2.htm"  noresize scrolling=no frameborder=0 bordercolor=#778899>
<Frame name="rightFrame" src="intro.htm"  noresize scrolling=no  frameborder=0 bordercolor=#778899>

and this is the file used to load file in right frame

<Form name="Form1" action="" method="Post">

<Table Border="0" CellSpacing="0" CellPadding="0" >
<Td Width="131" Height="36">
<a href="javaScript:hello()">
<Img Src="images2/b1.gif" Border="0" Height="36" Width="131" Name="menu1" Alt="Contact us">

<script language="JavaScript">
function hello()
if (n==1)
// load 1st file
else if (n==2)
// load 2nd file

m_adilAuthor Commented:
sorry for typing error
read <a href="javaScript:hello()"> as
<a href="javaScript:hello(1)">

and function hello() as
function hello(n)
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

u dont need javascript at all...
<a href="filename" target="rightFrame"><img ...></a>
and so on for your links..
in this way the link will open up in the rightFrame.
m_adilAuthor Commented:
got it.
Thanks alot
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.