Click to See Complete Forum and Search --> : IFRAME Contents


Geat
02-18-2003, 08:01 AM
I'm writing a HTML editor using an IFRAME (so that the user sees the final result and doesn't have to worry about tags). The user is running IE and will be the only user for this admin system, so browser compatibility is not an issue.

I get the page contents as HTML data in PHP, from the database, and I need to insert it into the IFRAME.

I would like to do this via HTML as opposed to using the IFRAME.write method - is it possible. A call to write could end as an exteremely long line of code if the page contents are many, and splitting the text into lots of string concatenations seems a bit inelegant.

Any suggestions?

Geat
02-18-2003, 08:39 AM
Neither, actually. The data is contained within a single PHP variable, and I need to get it into the IFRAME...

A direct echo, along the lines of:

echo 'myframe.write("'.$content.'");';

Generates the HTML

myframe.write("This is the
page contents, but
unfortunately there are
lots of page breaks and stuff.
So, I get a Javascript error!");

Geat
02-18-2003, 09:16 AM
That's great mate - it only needs to be simple, it's for a fairly computer illiterate site administrator. The WYSIWYG factor is the important bit...

Cheers!

Oh yeah - the HTML between the <IFRAME> tags is what is shown in browsers that don't support IFRAMEs...

Timbuck2
02-23-2003, 09:48 AM
You should ( or I ) only return data from the server
insertion assembly etc can occur on the client.

celebguy_dv
03-04-2003, 03:57 AM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)