Solved

How to create a simple preview page before form submit.

Posted on 2010-11-21
9
871 Views
Last Modified: 2012-05-10
I am trying to find a simple way to create a preview page before submitting.
Not sure if it would make a difference that I am using a form in asp with some fields automatically filled from a table based on their login.
Is there a simple way to do this?

Thanks in advance.
0
Comment
Question by:colonelblue
9 Comments
 
LVL 4

Accepted Solution

by:
Slim81 earned 250 total points
ID: 34184689
Couldn't you just pass the data to a page that displays the data, then submit the form data via hidden fields (via button click on the "display page")?

Are you using Dreamweaver?

-Slim
0
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 250 total points
ID: 34184743
** simple  and  preview ** are largely contradictory.  Any preview takes a new page refresh or a lot of code writing, and is not "Simple".

You can compose a preview page in a popup window entirely with javascript's document write which would be the javascript purists' way to do this, or you can send the data to PHP and have it send back a new page with the preview, which would be considered the "normal" way to do this.  Both take work.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 34185091
I agree with @scrathcyboy on this.  The preview pages I've had to do took a lot more code than the original forms.
0
 

Author Comment

by:colonelblue
ID: 34185443
@Slim81 : Thank you that was what I was assuming. I just thought there might be a simpler way, so I asked. Yes I am using Dreamweaver.

@scrathcyboy: As I had said above (  I just thought there might be a simpler way which prompted me to ask)  and what DaveBaldwin had ascertained that it took more code to do than the original form.

Incidentally as I initially posted , I am using ASP NOT PHP.
Also, if I knew how to "compose a preview page in a popup window entirely with javascript's document write" this question would be redundant, no? But thank you just the same.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34190380
I was merely pointing out that every way you go, ASP, PHP, javascript, it is doing a whole new page all over again.  However, there is a way you can get around ALL of this problem, if you are interested.

You develop 2 CSS style sheets -- one for viewing and one for printing.  Then at the top of the page you have a link View as webpage / view as print page -- and you simple TOGGLE the two style sheets to use either the one for printing or the one for previewing.

Once you do this at the outset, it is less than 2 pages of work, it is about 1.5 pages effort.  Note that the view as printed also includes making headers, graphics, icons and pictures disappear, so it takes a fair bit of CSS effort to get it right -- but it does work, and many sites are now doing it.

It will be the trend of the future, just as multilingual sites are now doing.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34190438
Didn't finish, sorry -- multilingual sites are doing this toggle button for the web pages for different languages.

And as far as a FORM, it is basically the same as a print preview, because you are redesigning it (by CSS or by page refresh) to look how you want it to look.  Most dual CSS pages are with the thought of final print layout.  It would take some careful thought as to how to style the form for preview, but it is doable.
0
 

Author Comment

by:colonelblue
ID: 34815150
Thank you.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34830219
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now