|
-
Mar 6th, 2003, 06:18 AM
#1
Thread Starter
Member
LostFocus Question !!
Hello
I'm trying to create in any language possible (Javascript I think).. the follow:
A textarea that receives the data of a textbox when it loses the focus.
Can anyone help?
Thanks!
-
Mar 6th, 2003, 07:10 AM
#2
When the textbox loses focus, or when the textarea does?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 6th, 2003, 07:27 AM
#3
Lively Member
hi!!
This should do it..
<textarea name="textarea"></textarea>
<input type="text" onBlur="entertext();" name="txtTheText">
<script>
function entertext()
{
textarea.value = txtTheText.value
}
</script>
-
Mar 6th, 2003, 10:36 AM
#4
Thread Starter
Member
Originally posted by meteor
<textarea name="textarea"></textarea>
<input type="text" onBlur="entertext();" name="txtTheText">
<script>
function entertext()
{
textarea.value = txtTheText.value
}
</script>
Indeed!! This is it! But instead of deleting the data that is already in the textarea.. I need it to be added to the data that I enter in the textbox. And.. by the way.. the data are numbers with two decimal places and aligned to the right.
And.. of course.. thank you for your help!
-
Mar 7th, 2003, 07:23 AM
#5
New Member
<textarea name="textarea"></textarea>
<input type="text" onBlur="entertext();" name="txtTheText">
<script>
function entertext()
{
num1 = parseFloat(textarea.value);
num2 = parseFloat(txtTheText.value);
textarea.value = num1 + num2;
}
</script>
That should work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|