Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 08-14-2008, 05:36 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Location: Philly, PA
Posts: 22
Default iFrames in Dreamweaver CS3

I finally figured out how to add and edit iFrames. But it's been a long time since I worked with them Is there a way to click a link on the main page and change the content in the iFrame?
__________________
Phil Nolan
3D Modeler / Animator
www.philnolan3d.com
philnolan3d is offline   Reply With Quote
Old 08-14-2008, 05:44 AM   #2 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

<body>
<a href="http://www.nofuss.com.au"
onclick="document.getElementById('test1').src=this .href;return false">test</a>

<iframe id="test1" src="" height=50% width=50%></iframe>

</body>



HTH,
JC
jnjc is offline   Reply With Quote
Old 08-14-2008, 07:21 AM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Location: Philly, PA
Posts: 22
Default

Thank you that worked perfectly. It's also beyond anything I learned back in the 90's.
__________________
Phil Nolan
3D Modeler / Animator
www.philnolan3d.com
philnolan3d is offline   Reply With Quote
Old 08-14-2008, 02:27 PM   #4 (permalink)
joe
Bronze Member
 
Join Date: Aug 2008
Location: Dallas, Tx
Posts: 83
Default

Or you could have used target=framename. Not sure how "compliant" that is, but it saves a bit of typing time.
joe is offline   Reply With Quote
Old 08-14-2008, 08:06 PM   #5 (permalink)
New Member
 
Join Date: Aug 2008
Location: Philly, PA
Posts: 22
Default

Quote:
Originally Posted by joe View Post
Or you could have used target=framename. Not sure how "compliant" that is, but it saves a bit of typing time.
That's actually what I was thinking it might be. But oh well, as long as I've got it typed in once it's essentially copy/paste from there.
__________________
Phil Nolan
3D Modeler / Animator
www.philnolan3d.com
philnolan3d is offline   Reply With Quote
Old 08-15-2008, 12:34 PM   #6 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

Quote:
Originally Posted by joe View Post
Or you could have used target=framename. Not sure how "compliant" that is, but it saves a bit of typing time.
I don't think you are right. As far as I know "target" only works with framesets not iframes....
jnjc is offline   Reply With Quote
Old 08-16-2008, 03:11 AM   #7 (permalink)
joe
Bronze Member
 
Join Date: Aug 2008
Location: Dallas, Tx
Posts: 83
Default

Quote:
Originally Posted by jnjc View Post
I don't think you are right. As far as I know "target" only works with framesets not iframes....
No it works. I use it a lot. maybe you should try it for yourself.
joe is offline   Reply With Quote
Old 08-16-2008, 11:14 PM   #8 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

I did try it and it opens a new window when you click the link, can you post an example ?
jnjc is offline   Reply With Quote
Old 08-18-2008, 01:58 AM   #9 (permalink)
joe
Bronze Member
 
Join Date: Aug 2008
Location: Dallas, Tx
Posts: 83
Default

This should work.

<a href="http://www.whatever.com" target="frame1">Click Here</a>
<iframe name="frame1" src="somethingelse.com"></iframe>
joe is offline   Reply With Quote
Old 08-18-2008, 02:17 AM   #10 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

I stand corrected, it does work and it is a much better way of doing it then the method I suggested.

The reason it wasn't working for me is because I used an 'id' on the iframe whereas I should have used 'name'.


Thanks,
JC
jnjc is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:54 AM.


Computer Forum - TechZine - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.