ciao
well it can be achieved in a variety of ways. I don't know precisely how
your page is arranged, and thus I can make only a few suggestions, not
necessarily the best ones, yet functional and they could be more precise
knowing better your pages.
Your 'problem' is basically to isolate a few form fields. let's say they are
input type="text" fields. Say your form has a name: "myform". This goes (or
must be called) after the form has loaded (arguably, you'll nest it within a
function, returning the output)
var output="";
var theform=document.myform;
for(var i=0; i<theform.length; i++){
if(theform.elements[i].type=="text"){
output+=theform.elements[i].value+"<br>";
}
}
alert(output);/*in a function: return output; to write document wriote or
whatever depending on where you print, maybe a textarea I have no clue*/
I hope this is what you meant. if you know beforehand the names of the form
fields involved, or they are arranged so that only a suffix chages, we can
even arrange faster loops, if that is of any concern for you.
ciao
Alberto Vallini
http://www.unitedscripters.com/
"Jason" <ja****@firemail.de> ha scritto nel messaggio
news:fa*************************@posting.google.co m...
Hello,
I am working on a website which uses forms to fill in a few answers to
questions. Does anybody know a javascript that prints only the answers
(i.e. the forms) and not the whole page?
I am asking this because printing the whole page takes 3 pieces of
paper, whilst printing only the answers will only take one.
Thank you.
Jason