473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Simple buttons, click to add to textarea?

117 100+
Ok, i have made 4 buttons, little buttons called.
B =Bold, --- =Line, U = Underline, SFT = Space just above my textarea About Me.

[PHP] <tr>
<td><input type="button" name="Button" value="B" onclick="ChangeText(this.form.aboutme,);" />&nbsp;<input type="button" name="Button" value="U" onclick="ChangeText(this.form.aboutme,;" />&nbsp;
<input type="button" name="Button" value="LINE" onclick="ChangeText(this.form.aboutme,[HR SIZE=1] [/HR];" />&nbsp;<input type="button" name="Button" value="SPACE" onclick="ChangeText(this.form.aboutme,<BR />;"/>&nbsp;
<br />
<textarea name="aboutme" cols="50" rows="10" wrap="virtual" id="aboutme"></textarea></td></tr>[/PHP]

How can i target the textarea when a user hits the button?
So if help me1 is hilighted, and he/she hits B button it will change it to.
help me!
Sep 4 '07 #1
3 1820
pbmods
5,821 Expert 4TB
Heya, Breana.

I'm going to go ahead and move this thread to the JavaScript forum, where our resident Experts will be better able to help you out.
Sep 4 '07 #2
dmjpro
2,476 2GB
How can i target the textarea when a user hits the button?
help me!
What do you mean by this line?

Kind regards,
Dmjpro.
Sep 5 '07 #3
acoder
16,027 Expert Mod 8TB
To access the textarea, use
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("aboutme");
You can style a textarea, but to create a WYSIWYG editor, you may need to learn about "designMode".
Sep 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: actionwoman63 | last post by:
Dear all I need to be able to check which one out of two submit buttons within the same form was pressed in a javascript function prior to form submission. And before I get flamed for not...
13
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if...
3
by: Syswatch | last post by:
Hi out there... I am pretty new to javascript, and is looking for some help here. I have a problem, I need a small javascript, which checks if there is any text in my textarea, and if it is NOT...
0
by: karen987 | last post by:
Could someone please tell me what code to add here? I have a weblog, with daily news which readers can add comments to, which are stored in a database. The form to add the comments is on an ASP page,...
1
by: johnjsforum | last post by:
Buddies, I have a web page to create HTML buttons dynamically as in the “formDivColorPicker” function ////////////////////////////////////////////////////////////////////////////////////...
17
by: AlBen | last post by:
Hello sorry I don't know about javascript but I have to finish my work and there I have some scripts on my page I have a textarea form and a select form when a user click in the select form...
7
by: moksha | last post by:
Hi, I am new to javascript and i am facing a problem in coding. plz help me out. I am using javascript for dynamically creating a table row which contains text boxes and radio...
3
maxx233
by: maxx233 | last post by:
Hello, I'm developing a simple program to control a video switcher we have via RS232. All the backend control stuff is figured out just fine, the interface is what's giving me problems! I'm...
2
Jezternz
by: Jezternz | last post by:
Okay, so basicly I have an array of functions, these functions are used to setup different menu's. The very first function sets up the main menu and links to other menus/pages. Note I have written...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.