?
Solved

Auto printing from a submit button

Posted on 2004-04-06
6
Medium Priority
?
289 Views
Last Modified: 2013-12-24
Using Frontpage 2000,  Have created a form that is connected to an Access 2000 Database. When the submit button is clicked it sends the data to my access database.

I need it to also print a copy of this form automatically to the users default printer... Is this possible ?

Just3082
0
Comment
Question by:just3082
[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
  • 4
  • 2
6 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 10767165
Place this code at the top of your results page

<Script Language = "Javascript">
window.print()
</script>

This will open the print dialogue box and allow the user to print the page.

RCMB

0
 

Author Comment

by:just3082
ID: 10767343
I do not have a results page.  Only my main form page and a confirmation page.

Just3082
0
 
LVL 12

Accepted Solution

by:
rcmb earned 1000 total points
ID: 10767420
Edit the line where the submit button is to read like the following:

<input type="submit" value="Submit Comments" onclick="window.print()">

You just need to add the onclick portion. This will click the form with all of the data in it. If you have any text area boxes, make sure they are big enough to view all data.

RCMB
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 
LVL 12

Expert Comment

by:rcmb
ID: 10767476
Note - If you are using the fp generated form there is really no way to modify the results. If you have built a confirmation page then use my first comment at the top of the confirmation page.

RCMB
0
 

Author Comment

by:just3082
ID: 10767885
The onlick worked great... The only problem is that all of my fields have validation rules, therefore if they skip a control and press the submit button they will receive the validation error as well as a print box....

But I'm ok with this unless there is a way to remedy it...

Just3082
0
 
LVL 12

Expert Comment

by:rcmb
ID: 10769187
The best way to remedy this is to have your page submit to a confirmation page and place the first code I gave you at the top of the page. You can create your own page and have it display the form results.

What are you doing with the form? If the information is being recorded in a database then have the form submit to an ASP page and then have the page display and print the results.

RCMB
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
Suggested Courses

770 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