This blog site is not meant to be any information that is distributed to the general public. It is to serve as shared documentation between the DNSTC developers; however, if you find something useful and would like to use it, go right ahead.

Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Monday, February 14, 2011

Inserting Page Breaks when Printing Reports

Sometimes we have to create reports that are HTML based. Of course HTML is not conducive to formatted pages when being printed. You can, however, format the output using a combination of CSS code and DIV tags. This will then insert page breaks when the report is sent to the printer. Please be advised, that these page breaks will not be visible on the screen, but will be visible is you do a print preview.


In the CSS of the document or attached CSS add the following:

div.pagebreak {
page-break-after: always;
}

In the body of the document where you want to place the page break at the following:


<div class="pagebreak"> </div>

This will create a page break when the pages are printed.


For more information about CSS page breaks.


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=909145&SiteID=1

Sunday, February 13, 2011

Submitting e-mail to pop-up window

Problem:

We had an issue with e-mail sending on an ASP Intranet and had to come up with a solution to redirect the sending of mail to a PHP page on the client's website.  The client's website did not have access to sendmail or any other program that could be used to send out the e-mail messages.

Solution:

To do this, we had to submit the data to a PHP page using a pop-up window, the only problem this caused was the form stayed on the screen with the entered data after it was submitted, since we used a pop-up window to submit the data.

I was able to solve this problem by adding the following code as an attribute to the form tag:
onsubmit="window.location='newpage.htm';"

This then changes the page that contains the form at the same time it is submitting the data to a pop-up page.