Site hosted by Angelfire.com: Build your free website today!
 

Welcome to...

[Navigation]

MyersDaily

[Navigation]

[News] [Games] [Photos] [Guestbook] [Preferences] [Feedback] [Homepage]
 
  Input A:
  Input B:
  Text Box:

  For some of the scripts you will be asked to enter text into these input fields.

  Tip: Try copying and pasting an entire document of your own into the Text Box to play with the replacement and match counting functions.

  To run the functions:

Read the explanations below, and select the function from this list and click Run Script.

  
Replacement Function ]   [ Text Production Function ]   [ Print Function ]   [ Popup Function ]   [ Date Function ]   [ To Hex Function ]   [ Timer Function ]   [ Visual Bell Function ]   [ Require Function ]   [ Cashing Function ]   [ Escape HTML Function ]   [ Query Parsing Function ]   [ Make Cookie Function ]   [ Read Cookie Function ]   [ Email Check Function ]   [ Phone Check Function ]   [ Zip Check Function ]   [ Expiration Check Function ]   [ Card Number Check Function ]   [ Text Check Function ]   [ Encrypting Function ]   [ Decrypting Function ]  

Up to the Input Form

  This is a demonstration of the replace() and LC() JavaScript functions. The replace() function is a very efficient function for replacing characters within a string with other characters, and the LC() function is excellent at counting matches of a certain character/group of characters within a string.

For the Demo:

Type characters in the Input A box to be taken out of the Text Box, and enter their replacements in the Input B box.


Up to the Input Form

  The chars() function makes it easy to produce a certain number of characters by giving the character to use and how long of a string you want returned.

For the Demo:

Type a letter or space in the Input A box, and enter the string length in the Input B box.


Up to the Input Form

  The empty() function allows you to remove "undefined" values (within the limits of JavaScript) by returning an empty string if a value is null, and the print() function lets you shorten the "document.write()" statement to just print().

For the Demo:

No demo, except that throughout my site both these functions are used extensively.


Up to the Input Form

  The Popup() function lets you easily create a new popup window.

For the Demo:

No input required.


Up to the Input Form

  The date() function lets you easily access the properties of the JavaScript Date() object and even adds to it by determing the current week and correcting oddities with the built-in values. The function as shown also uses a pad() function for easily formatting text to a margin.

For the Demo:

No input required.


Up to the Input Form

  The toHex() function converts a decimal number to a hexadecimal number.

For the Demo:

Type a number in the Input A box, and the hexidecimal value will be entered into the Input B box.


Up to the Input Form

  The Timer() function returns the time passed between the functions first call and its last call.

Up to the Input Form

  The Bell() function delivers a blink to the page as well as an alert box.

For the Demo:

Type a message (optional) in the Input A box. To produce a simple flash, leave Input A empty.


Up to the Input Form

  The require() function removes the possibility of having a prompt return a null or empty string value.

For the Demo:

Type a message in the Input A box, and the function's return value will be entered into the Input B box.


Up to the Input Form

  The Cash() function make it easy to format numbers into dollars and cents values.

For the Demo:

Type a plain number in the Input A box, and its formatted value will be entered into the Input B box.


Up to the Input Form

  The escapeHTML() function allows any HTML input to be easily escaped into character entities to avoid clashes with your document's layout.

For the Demo:

Type or paste an HTML document into the Text Box, and it will be properly escaped.


Up to the Input Form

  The parseQuery() function is a very well-designed function for the critical task of parsing a query string "?field1=value1&field2=value2" into an associative array.

For the Demo:

Leave the form fields full, and their values will be restored after submitting the form.


Up to the Input Form

  The makeCookie() function is a another excellent function for the purpose of sending browsers cookies.

For the Demo:

Leave the Text Box full, and its value will be kept in a new cookie and can be retrieved.


Up to the Input Form

  The readCookie() function is an excellent function for the purpose of receiving your cookies.

For the Demo:

The Text Box's value will be returned to the value it had when the cookie (if any) was set.


Up to the Input Form

 

This is the start of the input verification functions.

All of them return a boolean value. True if the input qualifies, false if it does not.

The Email() function allows you to verify email addresses to a certain extent, and does not permit more than one address.

For the Demo:

Enter an email address into Input A, and the boolean value of the Email() function's output will be returned to Input B.


Up to the Input Form

  The Phone() function allows you to syntax check telelphone numbers with area codes required.

For the Demo:

Enter an phone number into Input A, and the boolean value of the Phone() function's output will be returned to Input B.


Up to the Input Form

  The Zip() function allows you to check zip codes.

For the Demo:

Enter an zip code into Input A, and the boolean value of the Zip() function's output will be returned to Input B.


Up to the Input Form

  The Exp() function allows you to sanity check expiration dates.

For the Demo:

Enter a credit card's four-digit expiration date into Input A, and the boolean value of the Exp() function's output will be returned to Input B.


Up to the Input Form

  The Card() function allows you to error check VISA and MasterCard credit card numbers.

For the Demo:

Enter a card number into Input A, and the boolean value of the Card() function's output will be returned to Input B.


Up to the Input Form

  The simple Text() function disqualifies text entries of only spaces.

For the Demo:

Enter text into Input A, and the boolean value of the Text() function's output will be returned to Input B.


Up to the Input Form

 

These are the encryption functions.


The crypt() function allows you to safe keep important values like cookies for ID codes in a secure environment. Actually, I debated with myself whether to include this possibly dangerous function, but since the function is straight-forward enough, what's to lose?

For the Demo:

Enter something into Input A, and the encrypted value will be placed in the Text Box.


Up to the Input Form

  The decrypt() function decrypts input encrypted by the crypt() function. Note: The function takes two arguements, which are split from the value put in the Text Box from the crypt() function.

For the Demo:

Don't change the text in the Text Box!

Homepage ]   [ Site Index ]   [ New Stuff ]   [ Top of Page ]