Re: copying field values




<benjib98@xxxxxxxxxxx> wrote in message
news:1187343747.523795.7060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 17, 7:47 am, josh <xdevel1...@xxxxxxxxx> wrote:
On 16 Ago, 21:25, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:



josh wrote:
On 16 Ago, 18:21, benji...@xxxxxxxxxxx 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:

<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
--
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.


.



Relevant Pages

  • Re: copying field values
    ... evangelism: XHTML 1.0 Strict ... First I post when I want because if I make errors this newsgroup can ... One more thanx for your help josh:) ...
    (comp.lang.javascript)
  • Re: Dawning of a new day
    ... Thanks for pointing it out. ... I am somewhat busy today and just sneaking in a check at the newsgroup in between tasks. ...
    (soc.retirement)
  • Re: How do I clean my printer nozzles?
    ... Use of FollowUp-To header is pointless when you have it pointing at the ... same newsgroup to which you post. ...
    (microsoft.public.windowsxp.basics)
  • Re: Great SWT Program
    ... comp.lang.java.programmer newsgroup that has over 1500 articles"? ... Well, if I've said this so often, you shouldn't have any trouble ... pointing me to a specific post, ...
    (comp.lang.java.programmer)
  • Re: What design is this speaker?
    ... newsgroup and to cross-post to rec.audio.pro with a followup-to ... pointing here instead of double posting. ...
    (rec.audio.tech)