En réponse à
sa********@gmail.com qui écrivit, en date du : 4/09/07
11:40, le message suivant :
(...)
I am storing the values of the text-area in a variable. I am using
javascript to pass the variable.
Why ?
The form can't send this by itself ?
How do I pass this variable to a Perl script and how do I recieve
that variable in that script?
It is a PHP question, no ?
(or an asp question ...)
<form action="myFile.asp" method="post">
<textarea name="content" ...></textarea>
<button ....>Edit</button>
<input type=submit value="Save">
</form>
And with multiple textareas
<form action="myFile.asp" method="post">
<p>Infos 1 :
<textarea name="Text_1" ...></textarea>
<button ....>Edit</button>
<input name="save" type=submit value="Save info 1">
</p>
<p>Infos 2 :
<textarea name="Text_2" ...></textarea>
<button ....>Edit</button>
<input name="save" type=submit value="Save info 2">
</p>
<p>Infos 3 :
<textarea name="Text_3" ...></textarea>
<button ....>Edit</button>
<input name="save" type=submit value="Save info 3">
</p>
<p><input name="save" type=submit value="Save all"></p
</form>
The variables 'content'
or 'T_1' 'S_1' 'T_2' 'S_2' 'T_3' 'S_3'
are sent with their values
your asp (or php) has to analyze these couples variable+value
If you absolutly want to sent both to php and to perl
<form action="myFile.php" method="post"
onsubmit="return aspJS(this);">
<script type="text/javascript">
function aspJS() {
var url=[], f = this.elements;
for(var i=0; i<f.length; i++)
if(f[i].type=='textarea' && !f[i].disabled)
url[url.length] = f[i].name+'='+f[i].value;
if(url.length<1) {
alert('no change !');
return false;
}
setTimout(function() {
location.href = 'myFile.asp?'+url.join('&');
},10);
return true;
}
</script>
*if JS is enabled* that would call your asp and post the form to php
but ... what about disabled JS ?
--