frame or iframe?

Ask about a PHP problem here.
Post Reply
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

frame or iframe?

Post by louiegiezer »

is it ok to add some iframe on your site? i've heard b4 to jacek not to use idunno if "frame" or "iframe"... something like dat.. iframe is java right?...
ScTech
Posts: 92
Joined: Sat Aug 24, 2013 8:40 pm

Re: frame or iframe?

Post by ScTech »

Iframe is HTML to show contents of another page in the page you are viewing. Iframes are not very safe security wise so you should only use them when the page you want is trusted, and there is no other way but to use iframes. I'm not sure what the difference between iframe and frame are because I've never really used either. Perhaps someone else can explain further.
<iframe src="http://google.com">Text here if iframe is not supported in their browser</iframe>
<?php while(!$succeed = try()); ?>
User avatar
Temor
Posts: 1186
Joined: Thu May 05, 2011 8:04 pm

Re: frame or iframe?

Post by Temor »

I hate iframes, I really do. They are fine to use however if you've taken the necessary precautions first.

I prefer doing it this way instead:
Apply a <div> with some styling, including scrolling etc.
use either php or ajax, or a combination of both to fetch the data from one file and insert it into the div I want.

It does require a bit more work, but it's not using iframes, so it's a win in my book.
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

Re: frame or iframe?

Post by louiegiezer »

the reason why i asked about that is bcuz of rich text editor or wysiwg... instead of textarea they put it on iframe... can anyone know how to make a simple rich text editor... i onyly need bold,italic,underlined, and images only.. i dont need plugins... i want to learn how they do that... btw im looking 4 that in youtube... and other references ^^
User avatar
Temor
Posts: 1186
Joined: Thu May 05, 2011 8:04 pm

Re: frame or iframe?

Post by Temor »

I'm not sure I understand what you want exactly, but I'm guessing it has to do with BBcode.
Are you looking for something like tinyMCE?
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

Re: frame or iframe?

Post by louiegiezer »

yup sr... something like that..
ScTech
Posts: 92
Joined: Sat Aug 24, 2013 8:40 pm

Re: frame or iframe?

Post by ScTech »

Are you saying that you want to learn how to make one from scratch, or want one that is open source?

If you want to learn, there is a nice example of how to convert BBCode from text to HTML via PHP in this thread.
<?php while(!$succeed = try()); ?>
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

Re: frame or iframe?

Post by louiegiezer »

wow this awesome... thx much:) :D
Post Reply