...

View Full Version : how to display content of a hyperlink in a table on the same page



husnamina
12-06-2006, 04:00 AM
hi
i have to tables in one big outer table, they are seated in two columns. the left table is a menu. what i want to do is to make the 2nd right side table the target, so if a user clicks on a link the content is shown, just like in frameset only i dont want to use a frame set.
Any body pls, thnx:(

nikkiH
12-06-2006, 03:03 PM
Iframe?

ronaldb66
12-06-2006, 03:05 PM
That, or some DHTML to trigger the visibility of said content blocks on or off.

husnamina
12-07-2006, 02:43 AM
Iframe?

i have looked at the possibility of using the iframe, but how will then be possible to have the content of the iframe change with each menu selection?
since the code for iframe is <iframe> src="file name"</iframe> that means in my understanding only one file can be dispplayed in it.
As for the DHTML suggestion can you highlight further please.

nikkiH
12-08-2006, 02:41 AM
You can dynamically change the src of an iframe.

Example only:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> new document </title>
<script>
function clicker()
{
document.getElementById("f1").src="test3.html";
}
</script>
</head>

<body>
<form>
<input type="button" value="clickme" onclick="clicker()">
</form>
<iframe id="f1" name="f1" src="test2.html"></iframe>
</body>
</html>

SyntaxError
12-08-2006, 04:11 PM
Just as they were saying it would work by using an iframe. For this to work, all you need to do is target the iframe, as you would do with a frameset.

Just simple as this...


<iframe src="blah.htm" name="myframe"></iframe>

<a href="link1.htm" target="myframe">Link 1</a>
<a href="link2.htm" target="myframe">Link 2</a>
<a href="link3.htm" target="myframe">Link 3</a>

Hope that helped!

-SyntaxError



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum