Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Display a Message or Change the Cursor When Carrying Out a Lengthy Operation in an HTA?

(image) Hey, Scripting Guy! I have an HTA in which I do a search and create a table with the results. The search takes quite some time, 30 seconds or so. The results are displayed within a span and show up only once the search is complete. I would like a message ("Searching...") to appear in the span as soon as the search starts, then be ...

Hey, Scripting Guy! How Can I Change the Background Color of a Text Box?

(image) Hey, Scripting Guy! I have an HTA that we use for data entry. On this form, some of the fields are mandatory and some of them are optional. I’d like to indicate the mandatory fields by making those text boxes a different color than the text boxes used for the optional fields. How do I do that?-- IU(image) (image) (image) Hey, IU...

Hey, Scripting Guy! How Can I Change the Font Size of a Span in an HTA?

(image) Hey, Scripting Guy! I have an HTA that displays data in a span. Depending on the size of their monitor, some of my users complain that the font size in that span is too small. How can I programmatically change the font size of a span?-- OA(image) (image) (image) Hey, OA. You know, one of the missions of the Hey, Scripting Guy! ...

How Can I Limit the Number of Characters That Can Be Typed Into a Textarea?

(image) Hey, Scripting Guy! We have an HTA used for data entry. Included in that HTA is a text area where people can enter a maximum of 256 characters. I need to do two things: 1) limit the number of characters people can enter in the field to 256 (I can’t for the life of me figure out how to do that); and, 2) as people type, show them the...

Hey, Scripting Guy! How Can I Create a Self-Updating Text Box in an HTA?

(image) Hey, Scripting Guy! I have an HTA with three text boxes. In box 1 you enter a first name; in box 2 you enter a last name. I’d like box 3 to automatically update itself based on what you type in the other text boxes. For example, if you type Ken in box 1 then box 3 shows Ken. If you then type Myer in box 2 box 3 shows Ken Myer. How ...