burger menu icon
WillMaster

Latest at This Website

Here are the 11 most recent items:

Printed But Not Published
24 November 2025, 1:41:11

When someone prints your page, they expect to print what they see in their browser window. But you can print something they don't see beforehand.

As a demonstration, when you print the accompanying web page, you'll see a notice printed that I also write books. The notice is embedded in the printed article itself. You may give it a try and see how it works by printing this page.

Here is a screenshot of what will print with this article. (The screenshot may have adjusted in size to fit properly into your browser window.)

screenshot of demo

The URL of the actual page is so long that it would discourage folks from typing it into their browser. The flowto.us URL redirects to the destination. The QR code, however, goes to the actual page.

The QR code was generated with the QR Code Generator tool. The tool is free to use.

(The complete article is at https://www.willmaster.com/library/marketing/printed-but-not-published.php)
Download Link for Any File Type
16 November 2025, 11:20:14

"Download This File" is an easy downloader built with PHP. Link to downloadthisfile.php from your web page, and the file downloads.

To block hackers from downloading just anything from your site, you list (a) the complete individual file names that may be downloaded and (b) the file name extensions of the type of files that may be downloaded.

Download This File also automatically blocks downloading of any file below the document root — from any directory or its subdirectory where your domain's main or index file is located.

Although the Download This File software tells the browser to download the file and save it to the site visitor's hard drive, the browser may do something different.

Site visitors may view your site with a phone or other tool that is not set up to download or doesn't have sufficient storage space available for your file. In that case, the browser may attempt to display the file. Further, the browser may be set up to always display certain types of files in the browser, such as PDF, PHP, text, and image files.

The browser always has the final say.

(The complete article is at https://www.willmaster.com/library/marketing/download-link-for-any-file-type.php)
Secret Image File
5 November 2025, 5:33:12

There may be a reason to hide the URL of an image you will be using on a web page.

There is a way.

Use PHP code to pull it in.

PHP code is never sent to the browser. Thus, using PHP to pull in the image and insert it into the web page will effectively obfuscate the image source file's location. When the web page is loaded, the PHP code is replaced with the encoded content of the image file itself.

The image type needs to be PNG, JPEG, or GIF. The image file name extension is a clue to its type. *.png is PNG. *.jpeg is JPEG. *.jpg is also type JPEG. *.gif is GIF.

(The complete article is at https://www.willmaster.com/library/manage-forms/secret-image-file.php)
Password Eye
31 October 2025, 11:20:54

You've seen eye icons with password fields, I'm certain. When the eye icon is tapped, what you've typed into the password field becomes readable. If it is already readable, it becomes unreadable.

There are two eye icons. One is an open eye, and one is a closed eye.

When the password field is unreadable and the open eye icon is tapped, two things happen:

  1. The password field becomes readable.

  2. The eye icon changes to a closed eye.

When the password field is readable and the closed eye icon is tapped, the two things are reversed:

  1. The password field becomes unreadable.

  2. The eye icon changes to an open eye.

To read what was typed, tap the open eye. To obfuscate what was typed, tap the closed eye.

Within the web page code, when the open eye is tapped, this happens:

  1. The password field changes from type="password" to type="text".

  2. The src value in the img tag for the eye icon changes to the URL of the closed eye image.

Both actions are done with JavaScript.

(The complete article is at https://www.willmaster.com/library/manage-forms/password-eye.php)
A Facebook Trick
27 October 2025, 2:25:35

At Facebook, when you type a URL into a post or response, the Facebook bot grabs a copy of the page at the URL.

Other social media sites may do similar things. If yes, you may be able to apply the idea in this article for those sites.

When the Facebook bot grabs a copy, it scans the HTML header for specific information. If the bot doesn't find the information it is looking for, it scans the rest of the page for clues.

(The complete article is at https://www.willmaster.com/library/marketing/a-facebook-trick.php)
Form Debugging Assistant
19 October 2025, 3:10:55

Some forms have an abundance of HTML and JavaScript code interspersed among the form field tags. The amount of code may make it difficult to find and read the details of the various form fields. This is especially true with large or complex forms.

Therefore, it can be difficult to find form mistakes that slip through during development. There are many things to look for, perhaps even things a person isn't aware should be looked for.

There may be a duplicate field name. A field name with a space in it or between the name and an enclosing quote. Perhaps there is no value tag for a hidden field. Perhaps an id tag is needed. Or, a dropdown is missing a select tag. There may be a hyphen in a field name that had been meant as the id value.

A set of radio buttons may have different names rather than all the same. Maybe there's an extra <form...> or </form> tag somewhere within the form.

(The complete article is at https://www.willmaster.com/library/manage-forms/form-debuging-assistant.php)
Make Smaller Copy of Image
11 October 2025, 8:26:22

Along my decades of programming, I sometimes needed software to shrink an image to a smaller size. This week, I required one again.

As usual, what I required was specialized. Moreover, as usual, I was able to reuse much of what I had previously done. This time, the code to reuse was extracted from software I built about 2½ years ago and have been using ever since.

Then I had a thought. (Yes, me, having a thought.) So long as I was extracting and reusing code, I should build something for you, too.

The function is named MakeSmallerCopyOfImage. The function can be included within your PHP software.

You give the function the location of a PNG, GIF, or JPEG image. The function will copy the image, resize it, and save it in the same directory as the original. The copy will be smaller with the same width/height proportion as the original.

(The complete article is at https://www.willmaster.com/library/features/make-smaller-copy-of-image.php)
Tap to Select
6 October 2025, 9:27:00

Allowing site visitors to select content with a tap can be a sign of caring. That's especially true for content they are likely to want to copy, like source code to reuse or a list of requirements for something.

I'll describe how to implement the functionality.

(The complete article is at https://www.willmaster.com/library/features/tap-to-select.php)
CSV to HTML Table
29 September 2025, 6:13:41

A project had a complicated CSV file that I needed to create a MySQL table for. To do that, the CSV file had to be read to determine the type of fields.

For help visualizing the CSV, I built a quick script to convert the CSV content into an HTML table.

(The complete article is at https://www.willmaster.com/library/web-content-prep/csv-to-html-table.php)
Image Transparency
23 September 2025, 13:52:54

This is a quick how-to for publishing images with a transparency.

Perhaps your image is overlaying text. Maybe overlapping other images. Or it's just too bright for the surrounding content.

Whatever reason you have for making an image all or partially transparent, it can be done with the CSS opacity property.

(The complete article is at https://www.willmaster.com/library/web-content-prep/image-transparency.php)
Finding Div's Top-Left Corner Position
13 September 2025, 7:39:15

This article presents a JavaScript programmer's tool — for JavaScript programmers and those who want to learn the language.

There are likely to be times when you will need to know the exact position of a div or other HTML element. Two functions are provided in this article for determining the answer.

The reason you might want to determine the top-left corner of an element is likely to be nearly unique from anyone else's reason.

(The complete article is at https://www.willmaster.com/library/web-development/finding-divs-top-left-corner-position.php)

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2025 Will Bontrager Software LLC