Solved

Auto printing from a submit button

Posted on 2004-04-06
6
282 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
  • 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 250 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

707 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

13 Experts available now in Live!

Get 1:1 Help Now