Solved

How to create a simple preview page before form submit.

Posted on 2010-11-21
9
917 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

738 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