Welcome visitor
* Login
* Register
It is currently September 18th, 2019, 12:29 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 6 posts ] 
Author Message
  Link to a frame
PostPosted: December 16th, 2009, 6:05 pm 

Posts: 15
Hi, I have a link that I want to open inside a frame of a frameset? How can I do that?


Top
 Profile  
 
  Re: Link to a frame
PostPosted: December 16th, 2009, 6:46 pm 

Posts: 117
Use the target attribute:
<a href="http://www.scriptingok.com" target="frameName">this opens in a frame</a>


Your frame should be called "frameName"
<frameset>
  <frame name="framaName">
  <frame name="otherFrame">
</frameset>


Top
 Profile  
 
  Re: Link to a frame
PostPosted: December 16th, 2009, 7:47 pm 

Posts: 15
Thank you for your quick answer. I forgot to mention the important things :P. Right now the target is "win2" because the frameset is on a popup window. Does that make sense now?


Top
 Profile  
 
  Re: Link to a frame
PostPosted: December 17th, 2009, 6:06 am 

Posts: 65
Why dont you link to a document with a frameset, each frame with the desired document?
Like having many documents:

doc1:
frameset
frame1: src=scriptingok
frame2: src=google


doc2:
frameset
frame1: src=google
frame2: src=google


doc3:
frameset
frame1: src=scriptingok
frame2: src=home


etc... and just link to the needed frameset.


Top
 Profile  
 
  Re: Link to a frame
PostPosted: December 17th, 2009, 6:17 am 

Posts: 15
The problem is that some frames will be changed dinamically so I dont know what will be there then :roll:


Top
 Profile  
 
  Re: Link to a frame
PostPosted: December 18th, 2009, 7:27 am 
User avatar

Posts: 137
I suggest to use javascript:

This is to open the popup window. The important thing is that the new window is an object called "nw". Create it and name it as you wish, but that's the important stuff so...
<input type="button" value="create popup" onclick="nw=window.open('theFrameset.htm','_blank');" />


...You can easily access its properties and elements:
<a href="#" onclick="nw.document.getElementById('frame1').src='thisGoesInsideTheFrame.htm';">fake link</a>

And this is how the code for the popup window may look like:
<frameset>
  <frame name="frame1" id="frame1">
  <frame name="frame2" id="frame2">
</frameset>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron