copying field values

B

benjib98

Hiya,

I am novice into javascript, so would like to ask for some help guys.
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
Thank you

Ben
 
T

Thomas 'PointedEars' Lahn

I am novice into javascript, so would like to ask for some help guys. ^^^^^^^^^^
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
^^
Wrong newsgroup, I daresay.


PointedEars
 
J

josh

Hiya,

I am novice into javascript, so would like to ask for some help guys.
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
Thank you

Ben

here it the code:

<html>
<head><title>/<title>
<script type="text/javascript">
function copyValue()
{

var txt_from = document.getElementById("your_textarea");
var txt_to = document.getElementById("your_textbox");

txt_to.value = txt_from.value;
}


</script>

</head>
<body>
<textarea id="your_textarea">xxxxxxxxxxxxxxxxx</textarea>
<input type="text" id="your_textbox" value="TTTTTTTTTTTTT" />
<input type="button" value="copy" onclick="copyValue()"/>
</body>
</html>

Bye
 
T

Thomas 'PointedEars' Lahn

josh said:
I am novice into javascript, so would like to ask for some help guys.
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
[...]

Please trim your quotes, especially don't quote signatures unless you refer
them directly. Probably someone has asked that of you before.
here it the code:

<html>
<head><title>/<title>
http://validator.w3.org/

<script type="text/javascript">
function copyValue()
{

var txt_from = document.getElementById("your_textarea");
var txt_to = document.getElementById("your_textbox");

There is no need for IDs and D::gEBI() if an accessible `form' element is used.
txt_to.value = txt_from.value;

All retrieved object references should be tested before being used.
}


</script>

However, the OP appeared to ask for C# code.
</head>
<body>
<textarea id="your_textarea">xxxxxxxxxxxxxxxxx</textarea>
<input type="text" id="your_textbox" value="TTTTTTTTTTTTT" />
<input type="button" value="copy" onclick="copyValue()"/>

This is XHTML, not HTML.
</body>
</html>

Please *just don't post* if you don't have the minimum clue.
Probably someone has asked that of you before.


PointedEars
 
J

josh

josh said:
I am novice into javascript, so would like to ask for some help guys.
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
[...]

Please trim your quotes, especially don't quote signatures unless you refer
them directly. Probably someone has asked that of you before.
here it the code:

http://validator.w3.org/

<script type="text/javascript">
function copyValue()
{
var txt_from = document.getElementById("your_textarea");
var txt_to = document.getElementById("your_textbox");

There is no need for IDs and D::gEBI() if an accessible `form' element is used.
txt_to.value = txt_from.value;

All retrieved object references should be tested before being used.
</script>

However, the OP appeared to ask for C# code.
</head>
<body>
<textarea id="your_textarea">xxxxxxxxxxxxxxxxx</textarea>
<input type="text" id="your_textbox" value="TTTTTTTTTTTTT" />
<input type="button" value="copy" onclick="copyValue()"/>

This is XHTML, not HTML.
</body>
</html>

Please *just don't post* if you don't have the minimum clue.
Probably someone has asked that of you before.

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

First I post when I want because if I make errors this newsgroup can
correct me!
Second post more code and fewer philosophical concepts!
Third, as many people have already tell you, you must have more
respect of other people!

If a newsgroup exists is because people have doubts and people can
make errors and reading
other post to learn other things.

Please, be more modest!
 
B

benjib98

josh said:
On 16 Ago, 18:21, (e-mail address removed) wrote:
I am novice into javascript, so would like to ask for some help guys.
I am in a situation where I need to copy a value of fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a button
is cleicked.I am working on my ASP.NET project, so every help will be
appreciated.
At least help me where to start, I am using C# language.
[...]
Please trim your quotes, especially don't quote signatures unless you refer
them directly. Probably someone has asked that of you before.
There is no need for IDs and D::gEBI() if an accessible `form' element is used.
All retrieved object references should be tested before being used.
However, the OP appeared to ask for C# code.
This is XHTML, not HTML.

Please *just don't post* if you don't have the minimum clue.
Probably someone has asked that of you before.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

First I post when I want because if I make errors this newsgroup can
correct me!
Second post more code and fewer philosophical concepts!
Third, as many people have already tell you, you must have more
respect of other people!

If a newsgroup exists is because people have doubts and people can
make errors and reading
other post to learn other things.

Please, be more modest!

josh,
I can only agree with you, as the meaning of creating forums, having
discussions is to learn and help others to learn, especially if they
are novice(like myself) and have bright, new ideas.Therefore,I was
awaiting replies containing at least pointing to a source where I
could learn from,find stuff, and not having someone to state this is
the wrong place-if so the same amount of words are enough informing
which site,discussion I should go to,rather than to waste(his/her)
time for typing.
One more thanx for your help josh :)
Ben
 
D

David Cox

josh wrote:
On 16 Ago, 18:21, (e-mail address removed) wrote:
I am novice into javascript, so would like to ask for some help
guys.
I am in a situation where I need to copy a value of
fields(textboxes)
into another fields(textboxes) when a checkbox is checked or a
button
is cleicked.I am working on my ASP.NET project, so every help will
be
appreciated.
At least help me where to start, I am using C# language.
[...]
Please trim your quotes, especially don't quote signatures unless you
refer
them directly. Probably someone has asked that of you before.
here it the code:


<script type="text/javascript">
function copyValue()
{
var txt_from = document.getElementById("your_textarea");
var txt_to = document.getElementById("your_textbox");
There is no need for IDs and D::gEBI() if an accessible `form' element
is used.
txt_to.value = txt_from.value;
All retrieved object references should be tested before being used.


However, the OP appeared to ask for C# code.
</head>
<body>
<textarea id="your_textarea">xxxxxxxxxxxxxxxxx</textarea>
<input type="text" id="your_textbox" value="TTTTTTTTTTTTT" />
<input type="button" value="copy" onclick="copyValue()"/>
This is XHTML, not HTML.

Please *just don't post* if you don't have the minimum clue.
Probably someone has asked that of you before.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

First I post when I want because if I make errors this newsgroup can
correct me!
Second post more code and fewer philosophical concepts!
Third, as many people have already tell you, you must have more
respect of other people!

If a newsgroup exists is because people have doubts and people can
make errors and reading
other post to learn other things.

Please, be more modest!

josh,
I can only agree with you, as the meaning of creating forums, having
discussions is to learn and help others to learn, especially if they
are novice(like myself) and have bright, new ideas.Therefore,I was
awaiting replies containing at least pointing to a source where I
could learn from,find stuff, and not having someone to state this is
the wrong place-if so the same amount of words are enough informing
which site,discussion I should go to,rather than to waste(his/her)
time for typing.
One more thanx for your help josh :)
Ben

One small comfort for an innocent in the hauted forest is that some of the
wild animals are too busy eating each other to worry about eating us. When,
relieved, we do emerge and find a crossroads there does seem to be four
signs pointing different ways to Nirvanah.

I at least am learning lots of new stuff to be confused about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,413
Latest member
ReeceDorri

Latest Threads

Top