By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,373 Members | 1,792 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,373 IT Pros & Developers. It's quick & easy.

Using PHP + Images in an html TextArea tag

P: n/a
I'm trying to add images to a TEXTAREA tag (in my PHP web page) using
the usual image tag:

<INPUT TYPE="image" etc.

But the images are not showing up in the TEXTAREA but rather outside,
below it - I'm trying to display thumbnail images in a scrolling area
on the web page so I can insert a variable number of images into the
TEXTAREA object - can this be done this way or is there a better way
to insert multiple images in a scrolling object for a web page?

Thanks...

Jul 17 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Ralph Freshour wrote:
I'm trying to add images to a TEXTAREA tag (in my PHP web page) using
the usual image tag:

<INPUT TYPE="image" etc.

But the images are not showing up in the TEXTAREA but rather outside,
below it - I'm trying to display thumbnail images in a scrolling area
on the web page so I can insert a variable number of images into the
TEXTAREA object - can this be done this way or is there a better way
to insert multiple images in a scrolling object for a web page?

Thanks...


I know it's impossible for images to be in a textarea, hence it being a
"textarea" You could create a whole new PHP page (or accept a special
param in the GET line) and use an <iframe>...

Or just output it to the screen like you would normaly and let the user
scroll normally.
-Eric Kincl
Jul 17 '05 #2

P: n/a
Ralph Freshour <ra***@primemail.com> writes:
I'm trying to add images to a TEXTAREA tag (in my PHP web page) using
the usual image tag:

<INPUT TYPE="image" etc.
TEXTAREA is for creating a multi-line text entry field for a form,
not for displaying images. And the "usual" image tag is IMG, unless
the form has clickable images that should effect a form submission.
But the images are not showing up in the TEXTAREA but rather outside,
below it - I'm trying to display thumbnail images in a scrolling area
on the web page so I can insert a variable number of images into the
TEXTAREA object - can this be done this way or is there a better way
to insert multiple images in a scrolling object for a web page?


Are you creating a form for submission, or are you just trying to
(ab)use form elements to control how the page is rendered? If the
latter, then perhaps IFRAME is what you want.

BTW, this doesn't have anything to do with PHP -- it's an HTML issue.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 17 '05 #3

P: n/a
Ralph Freshour <ra***@primemail.com> wrote in message
news:<6d********************************@4ax.com>. ..

I'm trying to add images to a TEXTAREA tag
Stop trying. It's not going to work. TEXTAREA is just a form
input, it is not supposed to hold anything othe than plain text...
I'm trying to display thumbnail images in a scrolling area
on the web page


Use frames.

Cheers,
NC
Jul 17 '05 #4

P: n/a
Bob
Hi, U can use < dev class="xx"></div>
Where class xx:
..xxx{
background-color: white;
overflow: scroll;
......
}

nc@iname.com (Nikolai Chuvakhin) wrote in message news:<32**************************@posting.google. com>...
Ralph Freshour <ra***@primemail.com> wrote in message
news:<6d********************************@4ax.com>. ..

I'm trying to add images to a TEXTAREA tag


Stop trying. It's not going to work. TEXTAREA is just a form
input, it is not supposed to hold anything othe than plain text...
I'm trying to display thumbnail images in a scrolling area
on the web page


Use frames.

Cheers,
NC

Jul 17 '05 #5

P: n/a
Bob wrote:
Hi, U can use < dev class="xx"></div>
Where class xx:
.xxx{
background-color: white;
overflow: scroll;
.....
}

nc@iname.com (Nikolai Chuvakhin) wrote in message news:<32**************************@posting.google. com>...
Ralph Freshour <ra***@primemail.com> wrote in message
news:<6d********************************@4ax.com>. ..
I'm trying to add images to a TEXTAREA tag


Stop trying. It's not going to work. TEXTAREA is just a form
input, it is not supposed to hold anything othe than plain text...

I'm trying to display thumbnail images in a scrolling area
on the web page


Use frames.

Cheers,
NC


i'd recommend using an iframe, it'd work much better

Jul 17 '05 #6

P: n/a

"Anonymous" <an*******@isp.com> wrote in message news:92mAb.315809$275.1067304@attbi_s53...
Bob wrote:
Hi, U can use < dev class="xx"></div>
Where class xx:
.xxx{
background-color: white;
overflow: scroll;
.....
}

nc@iname.com (Nikolai Chuvakhin) wrote in message news:<32**************************@posting.google. com>...
Ralph Freshour <ra***@primemail.com> wrote in message
news:<6d********************************@4ax.com>. ..

I'm trying to add images to a TEXTAREA tag

Stop trying. It's not going to work. TEXTAREA is just a form
input, it is not supposed to hold anything othe than plain text...
I'm trying to display thumbnail images in a scrolling area
on the web page

Use frames.

Cheers,
NC


i'd recommend using an iframe, it'd work much better


If you don't want to deal with multiple "src" files which you would have to use in an Iframe, you can create a scrolling area with
CSS. Personally I like this option the best as it keeps all the code together.

<DIV style="height:160px; border: thin #000000; overflow-y:scroll; overflow-x:hidden;">

Scrollable HTML/PHP code goes here

</Div>

In the end it's not really a PHP issue, but more of an HTML/CSS issue.

-CF
Jul 17 '05 #7

P: n/a
ChronoFish <de**@chronofish.com> wrote or quoted:
"Anonymous" <an*******@isp.com> wrote in message news:92mAb.315809$275.1067304@attbi_s53...
Bob wrote: i'd recommend using an iframe, it'd work much better


If you don't want to deal with multiple "src" files which you would
have to use in an Iframe, you can create a scrolling area with
CSS. Personally I like this option the best as it keeps all the code
together.

<DIV style="height:160px; border: thin #000000; overflow-y:scroll; overflow-x:hidden;">

Scrollable HTML/PHP code goes here

</Div>


As with the iframe, this won't work in Mozilla, Firebird or Opera.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.