RE: HOWTO read PHP source code into a textarea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I have a file 'nav.php', whose source code I want to load 
> into the textarea on page 'aaa.php', so the source can be 
> edited and changed.
> 
> Is there a resource that I can read to help me do this?

If you want to render HTML into a textarea then I am afraid you are on a
hiding to nothing - the only thing a textarea can render (on all platforms)
is text.  So in that regard you may wish to jus modify your code that
aaa.php becomes a function that returns a string that you can set as the
value like so:

<textarea name="test"><? echo $some_text; ?></textarea>

There is a prject called htmlAreas which allows for rendering of HTML in a
textarea but it only works on IE: http://www.interactivetools.com/  but
again, this would require the same kind of modification as above.

Another solution would be to use an <iframe src="aaa.php"> tag...

HTH,

Mikey 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux