November 18, 1999

Determine Time on Client Machine

Question: How can I get the system time using HTML and JavaScript? Answer: I’m assuming that by “system time,” you mean the time on the client machine. You can access this information by creating a new Date object, without using any parameter, and then get the individual time pieces. This

Change Button’s Destination Depending on Option Clicked

Question: I have a menu frame that has a popup menu with many options and four buttons below it. How can I change the buttons’ destination links depending on the option that the user makes in the popup menu? Answer: You can access the onClick event for the input buttons

Load Images off JAR Files

Packing resources (classes, sound files, images) in a JAR file is good way of reducing download time and decreasing distribution size. This tip shows you how to load images off a JAR file.Say you have a JAR file containing some GIF images that your application will use. The following class

Swap Strings Faster

Here’s a cool way to swap strings: Declare Sub CopyMemory Lib “kernel32” Alias _ “RtlMoveMemory” (Destination As Any, _ Source As Any, ByVal Length As Long)Sub SwapString(String1 As String, String2 _ As String) Dim Save As Long ‘ This code swaps the string descriptors, not ‘ the data. StrPtr returns