Basic Customization > User Interface Customization > User Interface Technology Overview > Javascript Functions Overview > Other Functions in main.js
  
Other Functions in main.js
Name
Purpose
getElementsByClassNameAndTag (className, parentElement , tag name)
Returns all the children of the parentElement that match the given Tagname and contain the className. Optimized version of getElementsByClassname so that it does not have to look at all the items in the page.
refreshDivTag(id, name, url)
Refreshes the contents of a div (via Ajax) when an element fires its change event.
getElementHtml(params, divID, doAsynch, url, doFade, successFunc, failFunc, options)
Used to create a fade effect on a portion of the html page that is being updated via an ajax request.
addRows( list, tableId, refresh, doAjaxUpdate, preventDuplicates )
Modifies the hidden form fields of tables used in wizards when users dynamically add rows to said table. Can cause the row to be added dynamically if the doAjaxUpdate is true.
PJLrefreshOpener() and refreshOpenerOnly()
Refreshes the parent window.
getClipboardItems()
Family of methods for getting contents of the Clipboard as a comma delimited list.
Wizard.js functions
Name
Purpose
handleRequest (table_id,
params)
Refreshes a table given the params
doRequest (url, options)
Make the ajax request for the table. Used by the above method to change the url with the options set.
parseAnonymousParams (startIndex, params, result)
Add request params to the options based on the params list passed in.
getParamString
Adds all this form params to the ajax request including the params passed in.
updateStepImage
Updates the wizard step indicator images for all steps based on the current state.
updateEmbeddedText
Updates the embedded help based on the current step.
getNextStep
Gets the next step id.
setNextStepDirty
Sets the next step in the wizard to be refreshed when displayed.
goBack
Make the wizard go back one step
goNext
Make the wizard go to the next step
setActiveStep (stepId, wizardAction)
Makes a specific step active.
wizardAction is an optional parameter. It indicates if the user is attempting to go back or forward in the wizard.
findStepIndex
Find the index of a step id
setNextStep
Override what the next step id is
setStepDirty
Set a step to need a refresh should it display again
setStepClean
Set a step to NOT need a refresh should it display again
setStepIncomplete
Set a step to need to be vistited again as it needs more info
setStepComplete
Set a step to NOT need to be vistited again as it does not needs more info
setStepRequired
Make a user visit a step before the wizard can be completed
setStepOptional
Make a user able to complete the wizard WITHOUT visiting the specified step id
removeStep
Remove a step from the list of steps
insertStep
Add a new step to the list of steps based on what has already happened - dynamic steps
resetOkButton
Sets the ok button to be displayed or not based on the current state.
resetNextBackButton
Sets the next/back button to be displayed or not based on the current state.
disableOkButton
Force the finish and apply buttons to be disabled
enableOkButton
Force the finish and apply buttons to be enabled
getCurrentStep
Gets the current active step id
refreshCurrentStep
Refreshes the current wizard step
refreshStep
Refreshes the speicified wizard step
getAbsoluteUrl
This function takes a url and turns it into an absolute URL.
goProgress
Turns on the progress indicator
stopProgress
Turns off the progress indicator
onSubmitMain
Finish the wizard by executing it on the server
handleSubmitResult
Handles the response of the wizard submission, the response is mostly a form result string object that tells the browser what to do. Not quite jSON yet though.
onClickValidation (evt, key)
To do Ajax validation when an action is clicked.
The event object.
The key to use in validation code
checkRequired (skipErrorMsg)
Grabs every input that is styled as 'required' and checks to make sure it has a value. If any required fields do not have values, the field in question is highlighted and an alert message is displayed. This function returns a boolean that is true if the required fields are entered and false if any required field is not filled in.
@param skipErrorMsg can be used to suppress the alert message