workking on controlling HTML froms with javascript

M

Mainard

Hi, all

First off I know alittle about javascript, but i have never worked with
controlling froms with it be for i wonder can some help me?

for example:I have this <textarea name"write1">Write Your
Message:</textarea> on a form called myform2, and i have another form
and textarea on another page. how am i to send the text from one from
to the other form?

if someone could help me i would be gratefil.
 
M

marktm

Try this:

<script>
function copyValue(){
document.form2.text1.value = document.form1.text1.value
}
</script>


1. Enter text in this textarea:
<form name="form1">
<textarea name="text1">

</textarea>
</form>


2. Click here...
<form>
<input type="button" value="copy value" onClick="copyValue();">
</form>

3. your text will be copied to this textarea
<form name="form2">
<textarea name="text1">

</textarea>
</form>
 
M

Mainard

Sorry, but the forms I was talkking about are on different pages
I am trying to make a message borad
unless i need to replace document with the name of my page?
 
M

Matthew Lock

You are going to need some server side script or programs to make a
message board, such as perl, php or asp.
 

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
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top