Solved

Auto printing from a submit button

Posted on 2004-04-06
6
287 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 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

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…
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
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…

726 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