Nancy Leiby - PowerPoint PPT Presentation

About This Presentation
Title:

Nancy Leiby

Description:

put javascript:' in the URL text box to bring up the Console. Netscape is pickier about JavaScript ... Set the focus of the cursor to a text box or other field ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 11
Provided by: nancyje
Category:
Tags: leiby | nancy | pickier

less

Transcript and Presenter's Notes

Title: Nancy Leiby


1
JavaScript 102
  • Nancy Leiby
  • December 11, 2001

2
JavaScript Notes
  • Debugging JavaScript in Netscape put
    javascript in the URL text box to bring up the
    Console
  • Netscape is pickier about JavaScript
  • Case sensitive
  • Two ways to specify the form
  • document.formname.fieldname
  • document.forms0.fieldname

3
1onLoad.cfm
  • Perform an action when the page is loaded using
    onLoad
  • ltBODY onLoadgt
  • Set the focus of the cursor to a text box or
    other field in a form using the JavaScript
    focus() function

4
2onSubmit.cfm
  • Perform an action when the form is submitted
    using onSubmit
  • Use when validating data option to not submit
    the form when bad data found
  • ltFORM onSubmitreturn gt
  • If true is returned, the form is submitted
  • If false is returned, the form is not submitted

5
3onClick.cfm, 3location.cfm
  • Perform an action when an object is selected
    using onClick
  • Use with button, checkbox, radio, link (image
    button)
  • Validation
  • Change the form action destination using
    JavaScript document.location
  • ltINPUT onClickgt

6
4dynamicfieldnames.cfm
  • Access a field/object with a dynamically created
    name
  • Evaluate("form.fn"i)
  • document.formname.elementsfn"i
  • Submit a form using the JavaScript submit()
    function

7
5converttointeger.cfm
  • In JavaScript multiply by 1to convert a field
    value from a string (default) to a number
  • JavaScript append and numbers

8
6relatedlists.cfm
  • Perform an action when a field is changed using
    onChange
  • ltSELECT onChangegt
  • Convert multi-dimensional arrays in CF into
    JavaScript arrays using CFWDDX
  • ltCFWDDX action"CFML2JS"

9
7callback.cfm, 7caller.cfm
  • Open a page to allow the user to make a selection
    and insert the selection on the calling page
  • Call a JavaScript function in the page that
    opened the current page using opener property.

10
Information
  • Contact me at
  • nancy.j.leiby_at_syntegra.com
  • My favorite JavaScript book
  • JavaScript Bible by Danny Goodman(IDG Books
    Worldwide, Inc.)
Write a Comment
User Comments (0)
About PowerShow.com