AJAX Tutorial: Retrieving Data
This is a demonstration of how you can use AJAX to look up a zip-code entered into a form field.
When the zip-code is entered, we make a call to our data using (AdamV's) Javascript / AJAX, and populate the form without refreshing the page!...
Alert your user!
Here's a quick way to let your user know something when they press a button...
<BR>
Capture Right-Mouse Clicks
Not sure where I grabbed this from, but it can be used to capture the right-click event from a browser.
Cascading Menu (Source Pages)
When you use the code from the "Cascading Menu" link in this section, you use 2 source pages for the menus. The code below is an example of those source pages.
<BR>
Change Textarea size dynamically
This example shows you how to resize a textarea dynamically. Useful when someone is editing long text, but you wish to display in a compact fashion until the user needs more typing space.
Check/Uncheck Checkboxes using buttons and/or links
Copy this code into a page and load it.
This example shows you how to check / uncheck checkboxes using Javascript.
The example is field-name independent (you pass in the form id attribute instead), so it's friendly to anything you want to...
Confirm a User Input
Use this script to confirm a user's input.
It seems that in PHP, the 'alert' portion assists in exectuion of the remainder of the 'if' statement.?.?
Disable Submit Button
This is a simple form which, on the onClick event for the button, will disable the button on a form.
Dynamic Combo-Boxes
Want to fill a combo box with new values when the user clicks on one of your other combo boxes?
Here's how - just paste this code into a new html page.
Form Validation
Here's a quick example of how you can loop through all fields in a form, and see ensure they have a value.
Paste the code below into a new page.
HTTPFetch
Use this script to fetch a file.
Courtesy of:
http://www.liquidcoolresearch.com/asp/
NOTE: You will need to get the Java Class (FREE):
http://www.liquidcoolresearch.com/asp/HTTPFetch.class
Javascript Object Inheritance
Use the following methods to create an instance of a class, then have that class inherit another function using prototype constants.
Javascript Regular Expression Routine
This is a javascript function that currently will check for US Phone numbers ((###)-###-####), valid email addresses (123@123.com), and valid dates (mm/dd/yyyy). It accepts two parameters, 1) the obj context in question, 2) the id of the validation ...
Replace text on the fly
This example includes both an onMouseOut event, and a non-onMouseOver event. This way you can display text either "permanently", or until mouse is moved away from the link.
<BR>
<BR>
Running Clock Display
Use this code to create a running clock. Using a DIV or any other HTML object that allows you to set the innerHTML: Invoke the clock function from a BODY onload event.
<BODY Onload="clock()">
<div id ="dispClock"></div>
</BO...
Simple DOM Forward Script
This simple DOM forwarding script will replace the current page with whatever you tell it (like this site :-).