HTML & CSS
OK, now I know I'm being stupid here, but I am used to using asp or php but this project requires having a locally served html page that has a form that when submitted will show all the information as text - and I'm not sure how to do it!
I could have a print button on the form itself but the problem I have is with textareas, I need to print the scrollable region, among hiding some things from the input page. So say I have a name text field and a comments textarea field and a submit button. I want it to go to another html page that just shows the name and comments as text.
the form data ... could be printed on the resultant page via a CGI program , as in www.worldwidemart.com ( Form Mail) ,
Just like in asp I just needed to create variables that corrensponded to request.form("values") and write it.
HTML only provides the layout of the page . You need some dort of program to respond to the form's request I am sure .
I got the function here: http://www.btinternet.com/~a_urquhart/request.html
All I am doing is getting the data from the form and displaying it on another page. I could probably do it in vbscript too but just going to go forward. Thanks!
My solution (in the other thread ) would do what you want, because even though it is one page it views as 2 and will print as 2 as well.
Alternatively you could pop up a new window and then populate it with the form data.
I'm with Dale_burrel on this one.
it would really be easier to do it with one page. I understand that you want it to generate some kind of printable report from the form that the user has just filled in.
you can split the page in two and turn each half on and off whenever you wish so it looks like you have two completely seperate pages. This would really make it much easier for you to grab the data the user has captured and display it in whichever element in the hidden part of the page. then just switch to the report half when you are done and make everything you dont want to print invisible.
and like Dale says. you could have it acting exactly as if you have two completely seperate pages. no reason why you cant have the report half of the page looking exactly like it would look on a 'actual' seperate page.
I already am doing something similar to this, that's what I meant by getting the function above, but thanks for the links. Another possibly helpful thing for your second link is to add somthing like this before it displays:
textareafield = textareafield.replace(/\
so your line breaks appear....
This topic is now closed. New replies are no longer allowed.