Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-06-2006, 04:00 AM   PM User | #1
husnamina
New Coder

 
Join Date: Jul 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
husnamina is an unknown quantity at this point
Lightbulb how to display content of a hyperlink in a table on the same page

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
husnamina is offline   Reply With Quote
Old 12-06-2006, 03:03 PM   PM User | #2
nikkiH
Senior Coder

 
nikkiH's Avatar
 
Join Date: Jun 2005
Location: Near Chicago, IL, USA
Posts: 1,973
Thanks: 1
Thanked 32 Times in 31 Posts
nikkiH is on a distinguished road
Iframe?
__________________

If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit
http://www.kaelisspace.com/
nikkiH is offline   Reply With Quote
Old 12-06-2006, 03:05 PM   PM User | #3
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Dhtml

That, or some DHTML to trigger the visibility of said content blocks on or off.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 12-07-2006, 02:43 AM   PM User | #4
husnamina
New Coder

 
Join Date: Jul 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
husnamina is an unknown quantity at this point
Quote:
Originally Posted by nikkiH View Post
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.
husnamina is offline   Reply With Quote
Old 12-08-2006, 02:41 AM   PM User | #5
nikkiH
Senior Coder

 
nikkiH's Avatar
 
Join Date: Jun 2005
Location: Near Chicago, IL, USA
Posts: 1,973
Thanks: 1
Thanked 32 Times in 31 Posts
nikkiH is on a distinguished road
You can dynamically change the src of an iframe.

Example only:

Code:
<!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>
__________________

If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit
http://www.kaelisspace.com/
nikkiH is offline   Reply With Quote
Old 12-08-2006, 04:11 PM   PM User | #6
SyntaxError
New Coder

 
Join Date: Aug 2006
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
SyntaxError is an unknown quantity at this point
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

Last edited by SyntaxError; 12-08-2006 at 04:18 PM..
SyntaxError is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:23 PM.


Advertisement
Log in to turn off these ads.