form, textarea from file

P

PTM

I'm no javascript pro but have to write up a rather large system. Now
I'm stuck with a problem.

I would like to make a webpage where a customer vould edit short pieces
of text, abt 200-300 chr. If only this text were allways from and to the
same file, there would be no problem. I have made many pages with forms.

But now we need to make it so that the name of the file comes as
query_string from a PERL script and the file should go to the textarea
of the form.
I tried a classic

<TEXTAREA NAME="teksti" cols=40 rows=5>
<!--#include virtual="<!--#echo var='QUERY_STRING'-->"-->
</textarea>

This gives an error message
[an error occurred while processing this directive]

Is there any way to read textarea text from a separately named file?
We can rewrite pieces of the PERL code if it helps.
 
A

ASM

PTM a écrit :
I tried a classic

<TEXTAREA NAME="teksti" cols=40 rows=5>
<!--#include virtual="<!--#echo var='QUERY_STRING'-->"-->

<TEXTAREA NAME="teksti" cols=40 rows=5>
<!--#set var="page" val="$QUERY_STRING" -->
<!--#include virtual="$page" -->
</textarea>

or :

<form>
<TEXTAREA NAME="teksti" cols=40 rows=5>
<!--#include virtual="$QUERY_STRING" -->
</textarea>
</form>
<a href="<!--#echo var="QUERY_STRING" -->">
<!--#echo var="QUERY_STRING" --></a>

Test 2nd example here :
<http://stephane.moriaux.perso.orange.fr/truc/monip.shtml?innerHTML_danger.en.shtml>
 
P

PTM

ASM said:
PTM a écrit :
<form>
<TEXTAREA NAME="teksti" cols=40 rows=5>
<!--#include virtual="$QUERY_STRING" -->
</textarea>
</form>

PTM: Exellent ! Thank you !
This saved me many hours of work and it is more tight code than I had
hoped for.
I found domewhere a comment which stated that TEXTAREA can not contain
html code but still this seems to work at least in those browsers I have
tested so far.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top