Jeffy Posted October 31, 2005 Share Posted October 31, 2005 I think i have a unique situation that someone might be able to help me with. on my website when a link is clicked within an iframe it of course opens it in that iframe but my ultimate goal is for it to open the link and open another page in a seperate iframe at the same time. i guess you could consider it double linking? is there a way to do this? Link to comment Share on other sites More sharing options...
Jonas Posted October 31, 2005 Share Posted October 31, 2005 I think i have a unique situation that someone might be able to help me with. on my website when a link is clicked within an iframe it of course opens it in that iframe but my ultimate goal is for it to open the link and open another page in a seperate iframe at the same time. i guess you could consider it double linking? is there a way to do this?<{POST_SNAPBACK}> <a href="file_name.html" target="frame_name" onclick="window.open('http://www.somewebsite.com')">Clicky, clicky...</a> Link to comment Share on other sites More sharing options...
Jeffy Posted October 31, 2005 Author Share Posted October 31, 2005 heres more of a visual to what i am talking about 1=iframe 12=iframe 2-------------------------------////////--------------------------------------------////////--------------------------------------------////////----------------------11111---------------////////---2222-----------------------------------////////--------------------------------------------////////--------------------------------------------////////-------------ok so i have somthing displayed in iframe 1 and when i click a link in it i want it to display the link in iframe1 aswell as another document in iframe 2, only using the one link though Link to comment Share on other sites More sharing options...
Jeffy Posted October 31, 2005 Author Share Posted October 31, 2005 jonas thats the idea im looking for....didnt work exatly is there a way to get the onclick=window.open to open in itself by putting _self somewhere? Link to comment Share on other sites More sharing options...
Skemcin Posted October 31, 2005 Share Posted October 31, 2005 will the page in frame 1 always load a certain page in frame two or visa versa?Is one page always going to be associated with the other?If so,Frame 1 could use the onload function in the body tag to load frame two. If frame 2 always has a certain page related to it loaded in Fram 1, then put the onload in frame 2If none of these is the case, then you will have to pass the second frame target in a URL parameter and have the onload function be dynamically generated (via, javascript, php, asp, or cold fusion).hope this helps Link to comment Share on other sites More sharing options...
Jeffy Posted October 31, 2005 Author Share Posted October 31, 2005 can you tell me more about this onload attribute? Link to comment Share on other sites More sharing options...
Skemcin Posted November 1, 2005 Share Posted November 1, 2005 can you tell me more about this onload attribute? sure.The attribute is most commonly used in the <body> tag. Lets same that one of your Frame 2 pages is always supposed to have a particular page loaded in Frame 1 - then you would use something like this in the Frame 2 page:<body onLoad="frames[1].location.href= 'http://www.whatever.com.au'">If that code is in Frame 2 then you'll be able to the other page in Frame 1. There are a couple other ways you could manipulate the onload function if you are using cold fusion, php, or asp - even javascript - but that shoudl get you started.Let me know how it goes. Link to comment Share on other sites More sharing options...
Jeffy Posted November 1, 2005 Author Share Posted November 1, 2005 jonas has answered my question and it works. thank you all for your input Link to comment Share on other sites More sharing options...
Jonas Posted November 1, 2005 Share Posted November 1, 2005 Why don't you post it here Jeffy, so other people can see. You PM'ed me, so it felt natural to respond through PM, but really, everybody should get to see it. Not that it's the genious solution or anything... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now