TexasWebDevelopers.com Home Page
214-564-5316
Monday, February 08, 2010

Javascripts, ASP code, CSS, Access Database examples

This collection of javascripts, ASP examples, database tutorials, etc. were in response to questions put to us as moderators on the FrontPageTalk forum and we wanted to share them here...
(All examples will open in a new browser window.)

Tips ASP CSS Databases Javacripts Navigation Scripting Layouts

Tips and Tools
Create color schemes - for the sight impaired
html color chart - a table listing all the html colors
eMail validation scripts - ASP, .NET, javascript and VBscript
Monitor resolution - what are the most common browsers and monitor resolutions used?
ascii table - also shows hexidecimal values and oct, dec, chr and html
Common Header and Footers - for multiple fixed-width columns with multi-pagination at print
Active Server Pages/Forms/Passing Variables
Using ASP and "Case Select" to pass Query String variables and Form variables around on ONE page.
Using ASP and javascript to calculate total values selected in a drop down menu
Display pages in iframe depending on day of week
Limit and count characters in a text area - AND maintain the text area entry on "submit"
Change text to Upper Case (ALL CAPS) using ASP "uCase" - Use this in a form text box
Browse web site folders using ASP - Allow users to see the contents of selected folders
Create a Globally Unique Identifier - a 16 byte unique ID using Windows API
Server variables - example and code
Passing variables - using the example of building a doll (with code)
Passing Checkbox values - to a database using ASP and returning the values to the page
ASP Form Validation Script - Send more than one eMail on Submit
Using the Format function in ASP- Example, code and tutorial.
Currency Formatting - Using ASP
cDonts eMail with validation -Test this cool code by sending an eMail to yourself.
Upload images and files as "BLOBS" -  "Binary Large Objects" using ASP. A zip file with all of the files and instructions to accomplish this task.
Upload images to a folder and database - A zip file with all of the files and instructions to accomplish this task.
Password Protect your pages using ASP - protect pages with this easy login script using ASP. "Login" to download the code.
Password protection using an Access Database - protect pages with this easy login script using ASP and Access Database.
Redirect to another page - upon entering correct password
Cascading Style Sheet Stuff
CSS Tabs - Create the effect of Tabs using ASP and Case Selects with CSS
CSS Overflow - Create the effect of an inline frame using CSS and the overflow property
3-column CSS layout - Download (view source) to see how easy cross-browser CSS layouts really are!
CSS Layouts - Three examples of web page templates using CSS
Horz and Vert CSS Navigation - examples and code
Static CSS examples - download the code.
Horizontal CSS2 rollovers - Demo with code.
Horisontal CSS2 rollovers with tables - Demo with code.
CSS Hyperlink styles - see the style code in action
Format Hyperlinks with CSS - view source for the code
CSS Gradients - Color, fill and transparency using CSS with SVG (you may be asked to download a plugin).
Put a border - around a word in a line of text using CSS
Color - Your drop down menu backgrounds and text using CSS
Display Title tag - on mouseover. Use CSS and the span tag to make yellow "tool tip" appear.
Insert a date - in a text box or a form field with ASP
Using image backgrounds - in tables
Database Stuff
EASY PAGINATION - With Access using CSS to emulate the Digg style
How To Implement UPDATE and DELETE - Using Selected Fields in the Database
Introduction to SQL - Structured Query Language is how to get stuff out of a database and onto the page
Paging Through Records - Code showing how to page through N records at a time
Using a numeral in a database - to generate the "width" attribute of an image to make a bar graph
Using mod - to specify the number of columns in your database results
Expiry date - set data to expire on a certain date or number of days from input
Dependent Dropdown Boxes - this code has been around a while
Persist user choice in a database generated drop down list after "submit" -- done with a combination of ASP and javascript
ASP Product Rating system - uses bar graphs to grade products
Access Database Limitations - and restricted words
Retrieve random records - in an Access database
Javascripts
Show-Hide Layers - VERY simple six line javascript and link.
"Live" form validation - Simple form validation using AJAX and Excel.
AJAX field comparison using Excel as data source - Check to see if usernames are available using AJAX and Excel.
Adding content "on the fly" for designs "pinned to the left" - Sniff for Screen Width and drop advertisements or other content onto the page.
Javascript Tool Tip with pop up image and link - example with code.
Javascript client-side email validation script - example with code.
Ad rotator - set ad image opacity; timing; horizontal or vertical; set # of rows or columns displayed.
Show Hide multiple layers tutorial - Use different events including onMouseover, onMouseout, onClick, ctc.
Alert user with javascript if text box not filled in -- great for search page input boxes. This forces the user to input some text.
Build a Site Map -- a very nice Javascript File Tree Application with code
"Bookmark Us" Script -- easy to impliment script just copy and paste where you want the link to sit on the page.
Copy to Clipboard -- using javascript. Click a clipboard icon to copy anything in between the <pre> and </pre> tags.
"Set this page as your home page" - javascript code.  For IE5.0 browsers and above only.
Count Characters -  and limit their number in a text area
Drop down menu for frames - targets different framed pages.
60+ FREE Javascripts - Background Effects, Date and Time, Form Elements, Generators, User Information Display, Mouse Tricks, Redirection, Scrollbars, Title Bars, and Status Bars, Windows and Frames
Banner Rotator Script - Image rotator with links
Compare two dates - using javascript
Javascript "Go Back" button - Use a hyperlink or image to "go back" in the browser history.
Javascript "shopping form" - An easy way to total your products, shipping, tax, etc. using javascript, view source for code.
Passing Variables - use javascript to pass variables from one page to another
If...Else conditional statements - use radio buttons to calculate
Add numbers with javascript - simple javascript code as an example
Validate a checkbox - with javascript
Persistence (maintaining state) - In a shopping cart, without cookies or a database, using javascript!
Mortgage Calculator - Javascript example of Mortgage Calculator
Flooring Calculator - Javascript example of Flooring Calculator - view source for code
Vertical Marquee Scroller - Use a vertical marquee to display content and links
Password Validation - Type a password in twice to confirm it
Quick Javascript Login - Redirects to two different pages on valid or invalid username/password
Dulled focus in a form - Grey out a form field or put the cursor in a form field
Pop Up using layers - Here is a great way to show text without being affected by popup blockers.
Pop up Consoles - Examples and tutorials of javascript console or pop-up scripts.
Randomly change image - on page reload or refresh
Zoom in and out on image - uses javascript, view source for code.
Submit Form Only Once - simple DHTML Script
Limit the number of checkboxes that can be checked - in a form using javascript
Use Javascript to make text rotate in color
Show/Hide multiple layers
Navigation
Cascading Menu System - uses a small javascript and css
GUI Navigation Generators -- Flash, DHTML, and CSS Navigation generators!
ASP "BreadCrumb" navigation -- Automatically create BreadCrumb navigation with this simnple include page.
Disjointed RolloversTutorial and Example - using javascript disjointed rollovers that can be applied to any page.
Button fader effect - DHTML (a combination of HTML and JavaScript)
Drop down redirect - example and script to open new window (or not) from a drop-down menu.
Drop down redirect with frames - example and script to open new window (or not) from a drop-down menu.
Pop up - in a frames page
Javascript Hyperlinks in frames - Change the content of multiple frame pages with one hyperlink.
Menu Example for SPCA - Use layers and javascript for an interactive menu that can "hide" behind a graphic.
Image Swaps - Rollover script from Macromedia, tutorial and code.
Passing Variables and javascript - An example and tutorial using Track and Field Hurdle times as an example.
Play sounds - when you mouse over a hyperlink.
Image Maps - create an image and map some "pop up" hyperlinks onto it.
Layers Navigation - Show/Hide menu system with layers. The 54K file size is too large for most uses.
Scripting
Download E-mail Server Tester - This ASP page allows you to test your E-mail server directly for installed email clients. With support for CDOSYS, CDONTS, JMail and ASPMail.
Free Tiny Flash MP3 player - Download this free Flash MP3 player for your web pages
Show or Hide a layer - using a javascript timer
Pop up large images - from small images using a console script
URL Revealer - Paste in a scrambled URL or eMail header to catch spammers
Use DHTML to fly in an image - and then cause the screen to shake on "impact"
Use DHTML to disable form submit button - button is re-enabled on page refresh.
In-Line Frame - insert another page inside an existing page using an in-line frame
Hit Counter - Increment a simple hit counter and write out the results
Drop Shadow - Create a drop shadow for text without the use of a graphics program
Set Focus - Click a radio button to set focus in a text box
Flash Clock - analog clock--nice--download the swf and the html
Clock Scripts - Javascript and ASP clocks.  View source for code.
Tables and Layouts
"Liquid Design"- tutorial and code to make you pages fit any browser/monitor combination.
Spacer.Gif - Spacer.gif image for you to download.
Independent Tables - Demo, code and text.
Absolute Positioning and "liquid design" - Example of the misuse of absolute positioning with tables.
Create a "picture frame" - Using background images and table cells.
Create a site map - with Front Page 2002
Sales Theme Template - for FrontPage users
Finance Theme Template - for FrontPage Users
Move the scroll bar - to the left hand side of the page. Only works in IE6+