### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.2.3. < a4j:loadScript > available since 3.0.0

expand all

#### 6.2.3.1. Description

The <a4j:loadScript> component allows to load scripts from alternative sources like a jar files, etc.

#### 6.2.3.2. Details of Usage

The main attribute of the <a4j:loadScript> is "src" , wich defines the context relative path to the script. The value of the attribute does not require a prefix of an application. Leading slash in the path means the root of the web context. It is also possible to use `resource:///` prefix to access the script file using RichFaces resource framework.

Example:

    <a4j:loadScript src="resource:///org/mycompany/assets/script/focus.js" />

The "src" attribute passses value to the `getResourceURL()` method of the ViewHandler of the application, The result is passed through the `encodeResourceURL()` method of the ExternalContext.

#### 6.2.3.3. Reference Data

Table of <a4j:loadScript> attributes.

Table 6.17. Component Identification Parameters

Name | Value
--- | ---
component-type | org.ajax4jsf.LoadScript
component-family | org.ajax4jsf.LoadScript
component-class | org.ajax4jsf.component.html.HtmlLoadScript
renderer-type | org.ajax4jsf.LoadScriptRenderer

#### 6.2.3.4. Relevant Resources Links

Visit the Script page at RichFaces LiveDemo for examples of component usage abd their sources.

- Prev6.2.2. < a4j:keepAlive > ...
- Top of page
- Front page
- Next6.2.4. < a4j:loadStyle > ...