...

View Full Version : Submit textarea



jan lee
09-01-2010, 07:20 PM
Hello,

How I detect "onfocus event" when the textarea´s content receving the focos, but not by typing and auto submit it to another file.

The following example well illustrastes I am looking for:



<html>



<head>
<title>Auto submit textarea</title>

<style type="text/css">
.normal {
background-color: white;
color: black;
font-weight: normal;
font-size: 8pt;
font-family: Arial;
}
.accessible {
background-color: silver;
font-weight: bold;
font-size: 10pt;
}
</style>
<script type="text/javascript">
function fnSetStyle(){
event.srcElement.className="accessible";
var oWorkLabel=eval(event.srcElement.id + "_label");
oWorkLabel.className="accessible";
}
</script>

</head>


<body>

<FORM NAME="sorter">
<INPUT TYPE="TEXT" NAME="sorter2">
</FORM>

<FORM NAME="myform">
<label for="sorter2" class="normal" id="sorter2_label">Enter some text</label>
<input type="text" class="normal" onfocus="fnSetStyle()" id="sorter2" NAME="sorter2">
<INPUT TYPE="BUTTON" VALUE="Click Me" onClick="document.myform.sorter2.value = document.sorter.sorter2.value">
</FORM>
</body>


</html>


In the above example MYFORM2 receives the focos when typed, but not when
form name SORTER receives the focus, but the values are passed on to the MYFORM2. How I get such feature by code and autosubmit the MYFORM2?

Can anyone help me please?


Jan Lee

DaveyErwin
09-01-2010, 08:12 PM
Hello,

How I detect "onfocus event" when the textarea´s content receving the focos, but not by typing and auto submit it to another file.

The following example well illustrastes I am looking for:











In the above example MYFORM2 receives the focos when typed, but not when
form name SORTER receives the focus, but the values are passed on to the MYFORM2. How I get such feature by code and autosubmit the MYFORM2?

Can anyone help me please?


Jan Lee


<INPUT TYPE="BUTTON" VALUE="Click Me" onClick="document.myform.sorter2.value = document.sorter.sorter2.value;document.forms["myform"].submit();">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum