Amruta Gupta Posted March 15, 2007 Share Posted March 15, 2007 In frameset if there are links in Frame A then after clicking how to open them in Frame B. The links that I have prepared are opening in the same frame but I wanted them to open in the adjoining frame i.e Frame B.Kindly assist. Link to comment Share on other sites More sharing options...
vijay Posted March 15, 2007 Share Posted March 15, 2007 Hi...create following file with given code:and then try to run frame.html u will get the things...-----------------------------------------------filename: frame.html-----------------------------------------------<html><frameset cols="20%,80%"><frame src="frame1.html"><frame src="frame2.html" name="showframe"></frameset><noframes></noframes></html>-----------------------------------------------filename: frame1.html-----------------------------------------------<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><ul> <li><a href="link1.html" target="showframe">link1</a></li> <li><a href="link2.html" target="showframe">link2</a></li> <li><a href="link3.html" target="showframe">link3</a></li></ul></body></html>-----------------------------------------------filename: frame2.html-----------------------------------------------<!-- This is blank here we put the targe page from left link--->-----------------------------------------------filename: link1.html-----------------------------------------------This is content for link1-----------------------------------------------filename: link2.html-----------------------------------------------This is content for link2-----------------------------------------------filename: link3.html-----------------------------------------------This is content for link3Regards,Vijay Link to comment Share on other sites More sharing options...
Rantzien Posted March 15, 2007 Share Posted March 15, 2007 The short version is to give frame B a name attribute, for example: <frame src="url.html" name="frame_b" /> And then, when you want a link to open in frame B when the link is in another frame, give the link the attribute target="frame_b": <a href="newurl.html" target="frame_b">Link text</a> If the link is in frame B and you want to force it to open in frame B as well, use the keyword _self for the target attribute: <a href="newurl.html" target="_self">Link text</a> Link to comment Share on other sites More sharing options...
Amruta Gupta Posted March 24, 2007 Author Share Posted March 24, 2007 Thank you so much for the short and quick response that helped me a lot. The short version is to give frame B a name attribute, for example:<frame src="url.html" name="frame_b" /> And then, when you want a link to open in frame B when the link is in another frame, give the link the attribute target="frame_b": <a href="newurl.html" target="frame_b">Link text</a> If the link is in frame B and you want to force it to open in frame B as well, use the keyword _self for the target attribute: <a href="newurl.html" target="_self">Link text</a> Link to comment Share on other sites More sharing options...
Amruta Gupta Posted March 24, 2007 Author Share Posted March 24, 2007 Thank you so much for the short and quick response that helped me a lot. The short version is to give frame B a name attribute, for example:<frame src="url.html" name="frame_b" /> And then, when you want a link to open in frame B when the link is in another frame, give the link the attribute target="frame_b": <a href="newurl.html" target="frame_b">Link text</a> If the link is in frame B and you want to force it to open in frame B as well, use the keyword _self for the target attribute: <a href="newurl.html" target="_self">Link text</a> 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