Hi,
Could someone help me with following?
In one frame, I have a list with hyperlinks (code below) and when you click on a link a picture appears in another frame (main2). So far so good. At each hyperlink I would like to add a short comment to be displayed in a separate frame (country_name).
I tried to add the comment with the document.write method, like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"<html>
<head>
<title>African countries</title>
</head>
<body>
<font face="Verdana" size="2">
<ul>
<li><a target="main2" href="images/Africa/Algeria.jpg" onClick="parent.country_name.document.write('Algeria'.fontsize(5).bold())">Algeria</a><br></li>
<li><a target="main2" href="images/Africa/Angola.jpg" onClick="parent.country_name.document.write('Angola'.fontsize(5).bold())">Angola</a><br></li>
</ul>
</font>
</body>
</html>
My problem with this method is, is that once the first comment is displayed, the following is added to it, instead of replacing the first one. (I didn’t find a method to clear the old text, before writing the new comment.)
Alternatively I tried to display the comment in a text box (‘cntry’) I defined within the .htm-file that populates frame ‘country_name’, but could not find the correct code. This is one of the versions I tried out:
<li><a target="main2" href="images/Africa/Algeria.jpg"
onClick="input type='text' parent.country_name.document.form('cntry').value='Algeria'">Algeria</a><br></li>
All help with one of these two methods will be very appreciated!
Could someone help me with following?
In one frame, I have a list with hyperlinks (code below) and when you click on a link a picture appears in another frame (main2). So far so good. At each hyperlink I would like to add a short comment to be displayed in a separate frame (country_name).
I tried to add the comment with the document.write method, like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"<html>
<head>
<title>African countries</title>
</head>
<body>
<font face="Verdana" size="2">
<ul>
<li><a target="main2" href="images/Africa/Algeria.jpg" onClick="parent.country_name.document.write('Algeria'.fontsize(5).bold())">Algeria</a><br></li>
<li><a target="main2" href="images/Africa/Angola.jpg" onClick="parent.country_name.document.write('Angola'.fontsize(5).bold())">Angola</a><br></li>
</ul>
</font>
</body>
</html>
My problem with this method is, is that once the first comment is displayed, the following is added to it, instead of replacing the first one. (I didn’t find a method to clear the old text, before writing the new comment.)
Alternatively I tried to display the comment in a text box (‘cntry’) I defined within the .htm-file that populates frame ‘country_name’, but could not find the correct code. This is one of the versions I tried out:
<li><a target="main2" href="images/Africa/Algeria.jpg"
onClick="input type='text' parent.country_name.document.form('cntry').value='Algeria'">Algeria</a><br></li>
All help with one of these two methods will be very appreciated!