Jul 20, 2008

Please Help Me With <frame></frame>

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Please Help Me With <frame></frame>

.hack//GU
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.

Reply

electriic ink
Make it:

HTML
<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...

Reply

Lozbo
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'

 

 

 


Reply

Inspiron
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.
CODE

<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.
CODE

<body onload="breakout_of_frame()">
... (the rest of the document) ...
</body>

Reply

.hack//GU
I'll try to do that, thank you for sharing your knowldege. wink.gif

---------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!-)


Reply

Lozbo
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..

Reply

Kioku
You need each frame to have a title or name, whilst directing the a href to the target, which will be the frame's target. That's all.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics
Looking for frame, frame

Searching Video's for frame, frame
advertisement



Please Help Me With <frame></frame>



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE