Click to See Complete Forum and Search --> : Post to parent textarea help!!!!


Code One
09-05-2003, 09:09 PM
Hello,
I was wondering if anyone knows how to make it possible for an image converted into a button to be setup to post a specified character upon onclick, within a textarea located in the same HTML document? Like say I have an image that I turned into a button and when I click this button it would print the letter A in the textarea which is in the same HTML document.

Thanks ahead to anyone who can help!

Code One

Khalid Ali
09-05-2003, 09:14 PM
suppose following is the image turned into a button

<img src="" onclick="document.formName.textreaName.value='A'">

Code One
09-05-2003, 09:28 PM
Thanks Khalid! Your the man!

Code One

Code One
09-05-2003, 10:12 PM
How can I make it to were the letters will post and not overlap taking position over the next? Like so I can spell things out.

thanks buddy

Code One

pyro
09-05-2003, 10:26 PM
Could you perhaps explain what you are looking for a bit better?

Code One
09-05-2003, 10:29 PM
kinda like, ok well exactly like a computer keyboard. but in the computer. I have a keyboard made and I want it to post the letters as I click the buttons, into a textarea which is inside the same HTML document.

thanks

Code One

pyro
09-05-2003, 10:32 PM
Ah, ok...

<img src="a.gif" alt="A" onclick="document.formName.textreaName.value+='A'">

Code One
09-05-2003, 10:38 PM
the sign for adding. That is good. Thanks pyro!

Code One

pyro
09-05-2003, 10:41 PM
You bet... :)

Code One
09-05-2003, 11:58 PM
I was wondering what is the code to make something like a space bar effect? And also is it possible to make the words bigger and purhaps a different color? Thanks for all your guys's help!

Code One

pyro
09-06-2003, 07:13 AM
For space:

<a href="#" onclick="document.formName.textreaName.value+=' '; return false;">

And to make the words bigger and a different color, just add some CSS to the textarea:

<textarea rows="10" cols="50" style="color: #000000; font-size: 150%;"></textarea>

Code One
09-06-2003, 11:15 AM
Thanks again Pyro. I really appreciate you guys helping me out.

See ya

Code One

pyro
09-06-2003, 05:10 PM
You're quite welcome... :)