Welcome visitor
* Login
* Register
It is currently July 15th, 2019, 8:06 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  link my framed website
PostPosted: September 15th, 2009, 5:08 pm 

Posts: 42
Im using frames on my site and i want to create links to those pages but i want them to be loaded inside their own frames, is this possible or it will always be linked to the separate file?


Top
 Profile  
 
  Re: link my framed website
PostPosted: September 15th, 2009, 6:49 pm 
User avatar

Posts: 112
link to the document that has the frameset and on the linked url include something to identify which page should be displayed on the frames, for example
<a href="frameset.htm?framethisa.htm">go to document a.htm</a> 

parsing the location of the link we'll set the a.htm inside the frame. This script should be included on the main frameset to be run each time the frameset is loaded, just in case it was accessed by an external link
<script type="text/javascript">
function redirectt(){
x=window.location;
x=String(x);
y=x.search(/framethis/);
if(y>0){
x=x.substring(y+9);
window.open(x, "frameName")
};
}
<frameset rows="200px,400px" onload="redirectt();">

Finally, just notice that on this case I use on the link the "framethis" clue, and that's why we added 9 to the y, you can modify this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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