Monday, September 30, 2013

How do i print a web page

Here is your code :

  <form>
  <input type="button" value="Print This Page" onClick="window.print()" />
  </form>


Creating a custom 404 error page


You can simply upload a file such as 404.html to your website via FTP, or if you prefer you can follow the instructions below for creating this file in cPanel via the File Manager.

 
  1. Login to your cPanel.
  2. Under the Files section, click on File Manager.
  3. Select the Web Root (public_html/www)option.
  4. Click Go.
  5. file-manager-go
     
  6. From the top left-hand menu, click on New File.
    new-file
  7. Under New File Name: type in 404.html then click Create New File.
    create-new-file
  8. Right-click on the newly created 404.html then click on Edit.
    right-click-edit
  9. In the Text Editor pop-up, simply click on Edit.
    text-editor-edit
  10. Now you'd want to type in the HTML code for your custom 404 page, in this example we're using a very basic one that you can copy if you'd like. However you can get very fancy with your own, even going so far as to copying the style and images of your main site and placing your error message in the middle of that.

    <html>
    <head>
    <title>404 Page Not Found</title>
    <body>

    <H2>We're sorry but the page you're looking for could not be found</H2>

    </body>
    </html>

  11. After you've made your edits, click on Save Changes, and you should see a green Success pop-up.
    text-editor-save-changes
    file-manager-text-editor-save-success
  12. Now if you directly try to pull up /404.html in your web-browser, you should see the page we just created.
    web-browser-view-404