473,394 Members | 1,946 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,394 software developers and data experts.

Writing To Text Area.


Greetings,

I trying to but buttons for the users to write special characters to a
text area in a form by clicking in a button.
<form name="form1" onSubmit="return (function1() && function2() &&
function3();">
<textarea name=t1> </textarea>
<input type=submit value="ƒ">
<input type=submit value="¼">
<input type=submit value="÷">
<input type=submit value="µ">
</form>
<script language="JavaScript"><!--
function functionName1() {
window.document.form1.t1.value = 'ƒ';
return false;
}
function functionName2() {
window.document.form1.t1.value = '¼';
return false;
}
function functionName3() {
window.document.form1.t1.value = '÷';
return false;
}
function functionName4() {
window.document.form1.t1.value = 'µ';
return false;
}

//--></script>

Clicking on any button doesn't do anything but if I put just one button
it works, can anyone suggest what did I do wrong?

Thank you for your help.

Jul 23 '05 #1
2 1508
ASM
Adam a ecrit :

I trying to but buttons for the users to write special characters to a
text area in a form by clicking in a button.


and by very simple way and cheap code ?

<form>
Help for exoctic caracters : click on button to add its value<br>
<input type=button value="ƒ" onclick="t1.value+=this.value;">
<input type=button value="*" onclick="t1.value+=this.value;">
<input type=button value="÷" onclick="t1.value+=this.value;">
<input type=button value="µ" onclick="t1.value+=this.value;"><br>
<textarea name=t1> </textarea>
</form>

--
************************************************** *****
Stéphane MORIAUX et son vieux Mac
Aide Pages Perso (images & couleurs, formulaire, CHP)
http://perso.wanadoo.fr/stephane.moriaux/internet/
************************************************** *****
Jul 23 '05 #2
On Tue, 07 Jun 2005 23:29:57 +0200, ASM
<st*********************@wanadoo.fr> wrote:
Adam a ecrit :

I trying to but buttons for the users to write special characters to a
text area in a form by clicking in a button.


and by very simple way and cheap code ?

<form>
Help for exoctic caracters : click on button to add its value<br>
<input type=button value="ƒ" onclick="t1.value+=this.value;">
<input type=button value="*" onclick="t1.value+=this.value;">
<input type=button value="÷" onclick="t1.value+=this.value;">
<input type=button value="µ" onclick="t1.value+=this.value;"><br>
<textarea name=t1> </textarea>
</form>


Thank you, thank you, thank you, thank you, thank you.

It works as expected, more efficient that I ever can be.

I didn't say it before, thank you. :)
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
4
by: john smith | last post by:
Hi, I have a file format that is going to contain some parts in ascii, and some parts with raw binary data. Should I open this file with ios::bin or no? For example: filename: a.bin number of...
6
by: sentinel | last post by:
Hi, I’m trying to modify a DHTML editor that parses a style-sheet via PHP and instead of modifying the tags via execCommand(), find a way of writing inline styles by way of adding <span style=>...
10
by: Jake Barnes | last post by:
This weekend I wanted to learn AJAX, so I set up a little toy page where I could experiment. The idea of this page is that you click in one of the boxes to get some controls, at which point you can...
3
by: Ant | last post by:
Hi all, I have been trying to select text in a Text widget programmatically. I have been trying the following minimal example: #================================= from Tkinter import * def...
1
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
19
by: rmr531 | last post by:
First of all I am very new to c++ so please bear with me. I am trying to create a program that keeps an inventory of items. I am trying to use a struct to store a product name, purchase price,...
2
by: Matt F | last post by:
I can't seem to get heredoc to populate correctly with variables through a form. <textarea name="Template" rows="10" cols="80">Template Here</textarea> Contents could be something like: I want...
1
Haitashi
by: Haitashi | last post by:
Hi guys! First off let me explain that I know it's not possible to output html in a text area and expect it to appear rendered. =) I'm trying to come up with a solution. Basically, I...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.