Solved

How to create a simple preview page before form submit.

Posted on 2010-11-21
9
898 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 83

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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CORS Error from Chrome, but FireFox is OK 1 83
How to add a stringified JSON string to an IP address? 11 59
jquery tab header text 1 23
MS SQL + date 6 12
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

837 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