JavaScript 1021 Nancy Leiby December 11, 2001
JavaScript 1022 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.forms[0].fieldname…
JavaScript onLoad.cfm Perform an action when the page is loaded using onLoad Set the focus of the cursor to a text box or other field in a form using the JavaScript focus() function
JavaScript onSubmit.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 If true is returned, the form is submitted If false is returned, the form is not submitted
JavaScript onClick.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=
JavaScript dynamicfieldnames.cfm Access a field/object with a dynamically created name Evaluate("form.fn"&i) document.formname.elements[“fn"+i]… Submit a form using the JavaScript submit() function
JavaScript converttointeger.cfm In JavaScript multiply by 1to convert a field value from a string (default) to a number JavaScript append and numbers
JavaScript relatedlists.cfm Perform an action when a field is changed using onChange Convert multi-dimensional arrays in CF into JavaScript arrays using CFWDDX <CFWDDX action="CFML2JS" …
JavaScript callback.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.
JavaScript Information Contact me at: My favorite JavaScript book: –JavaScript Bible by Danny Goodman (IDG Books Worldwide, Inc.)