Jump to content
xisto Community
Sign in to follow this  
.hack//GU

Please Help Me With <frame></frame>

Recommended Posts

Help me, I want to make a website with frame left and right.so, I use <a href="file.html">Go</a>Next, in file.html I use<frame... and so on till </frame>Now, the question is:When I am at the file inside the frame, how can I get out from this page?because if I write <a href="index.html"> it only open the page within the frame.So, please tell me.

Share this post


Link to post
Share on other sites

Make it:

 

<a href="index.html" target="_top">

 

The target attribute tells it where to load the link. Having _top as a value tells it to remove all the frames...

Share this post


Link to post
Share on other sites

In the target attribute goes the name of the frame you want the link to open in, or if you want it in a new window ("_blank").I would recommend you to drop the frames and switch to pure xhtml and css design, you could try a few web sites and this forum to get started.There are several issues in working with frames that most people will rather advise you to avoid, but you just may need the things as fast as possible or may not have enough time to spend on learning this technologies right now.The main advantage of using frames is that you only make one page (say: the menu) and use it only once, and whenever it needs updating, you just need to update one file, and not every document of your site that had the menu (and this wouldnt be also that much trouble in some cases, if you know how to use a "seek and replace" function from whatever editor you are using). But you can take advantage of server side includes, which bassically work the same way, the only problem is that your web server must support the language you are writting your stuff in... (like jsp, asp or php).If you'd like additional information about this 'server side includes' you can post your question (i think a mod would advice you to make a new thread, or even better: search the forum for older threads where this topic has been already addressed)... Good luck and good codin'

Share this post


Link to post
Share on other sites

Seems like you are asking how to escape and break out from a frame.
Try this..

Include this code in the HTML which you didn't want it to be in a frame.

<head><script language="JavaScript" type="text/javascript"><!--function breakout_of_frame(){  if (top.location != location)   {	top.location.href = document.location.href;  }}--></script></head>

Change your body of the HTML as well to use the breaking out function.
<body onload="breakout_of_frame()">... (the rest of the document) ...</body>

Edited by Inspiron (see edit history)

Share this post


Link to post
Share on other sites

I'll try to do that, thank you for sharing your knowldege. :huh:---------edit:Yes, it's really works. I set it _top and it really gets out of frame.Thank you, and for next please help me to navigate the other frame to a file, do you know?I mean, I make the left frame as menu, so when someone click "Biodata" at the left frame, I want the right frame go to "biodata.html", so how could I do it? (I've tried target="_right", but don't think it's even exist...)(-Sory for little Out of Topic this is my 100th post!-)

Edited by .hack//GU (see edit history)

Share this post


Link to post
Share on other sites

You need to specify the name of the target, try: "_main" or "main" which are names assignated by default, but you should know the name of your main frame, you must have assigned it a name in the frame set... Look at your frameset document and seek for the name of the frame that is used as your right frame.You can name it whatever you want (no special chars, and usual limitations), doesnt have to necessarily be "right" or "_right". Greetings:) Dont be sorry, we help whenever we can..

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.