Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

printout

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
this is my task...i have to creat a survey that once filled out will give a printout of the results. each person taking the survey will have their own results. so if you were to go to my webpage take the survey hit submit, you would get a nice printout on the screen of what you did. then from their you can hit print and have a hard copy.
my question is how do i do the initial prinout of the results. my survey is created i just need the submit button to work. thanks, nikki
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my guess is that you have to use a server side (php or perl) or a javascript cookie.
here is one solution:

I have changed cookie to acookie in my code as Javaranch does not allow cookie to be posted
.Plese make it cookie when u copy and paste the code.


survey.html


and here is the nice printout page :
nicePrintout.html


I have changed cookie to acookie in my code as Javaranch does not allow cookie to be posted
.Plese make it cookie when u copy and paste the code.

hope this help.
 
Nikki Parker
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Reda...thanks for the help...i am still haveing trouble though, here is a snippet of my code using yours...and i am still getting compilation errors.
and i changed all the acookie to cookie

and my answer.html is the same code you gave me before.
any help is appreciated...thank you, nikkiacookie
 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this;
again:
I have changed cookie to acookie and the (o n c l i c k)to Click in my code as Javaranch does not allow cookie and (o n c l i c k) to be posted


and in the HTML I change this:
<form name="survey" action="answer.html" onSubmit="return(writeCookie())">
and for each question i add Click="setValue(this.value)"
ex:
<INPUT TYPE=radio NAME="button0" VALUE="yes" Click ="setValue(this.value)">
<INPUT TYPE=radio NAME="button1" VALUE="no" Click ="setValue(this.value)">
dont forget change all the acookie to cookie and the Click (o n c l i c k)... et voila.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic