> For the complete documentation index, see [llms.txt](https://aeudoc.gitbook.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aeudoc.gitbook.io/developer/presentation/client-script/get-partial-content.md).

# Get Partial Content

## Syntax

```
$.getPartial = function (url, id, chg, newUrl)
```

## Arguments

| <p><em>url</em></p><p> </p>    | String  | URI of the action that should be loaded.                                                                                                                                                                 |       |
| ------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| <p><em>id</em></p><p> </p>     | String  | Identifier of the Page Section that the content should be loaded into.                                                                                                                                   |       |
| <p><em>chg</em></p><p> </p>    | Boolean | If true, additionally change the URI in the address bar.                                                                                                                                                 | false |
| <p><em>newUrl</em></p><p> </p> | String  | <p>If parameter “chg” is set to true, this parameter must not be empty. This parameter must be different from the parameter “url”. The URI will be changed into the value of this parameter.</p><p> </p> |       |

## Description

Loads data from the Server into the Page Section specified in the parameter “id” by sending an HTTPGET request to the action of the URI specified in “url”.

If parameter “chg” is set to true, the current URI gets changed into the URI specified in “newURL”. If argument “chg” is set to true and argument “newUrl” is empty, then the URI gets changed into the URI specified in “url”.

If the URI that is specified in “newURL” does not exist or contains a spelling error, the function will still treat it as valid URI and load the page but an error message from the browser will likely follow.

## Examples

### Example 1: Loading content into specific Page Section without changing URL in address bar

The following program illustrates the function call with two parameters:

```
$.getPartial("main/partialload", "div-container-example");
```

It will send a request to “main/partialload” and load the response into the Page Section by the id of “div-container-example” replacing the content that is currently displayed in that Page Section. The URI in the address bar stays the same.

### Example 2: Loading content into specific Page Section with changing URL in address bar

The following program illustrates the function call with third parameter set to true:

```
$.getContent("main/partialload", "div-container-example", true, "main/page");
```

It will send a request to “main/partialload” and load the response into the Page Section by the id of “div-container-example” replacing the content that is currently displayed in that Page Section. The URI that is currently displayed in the address bar gets replaced by “main/page”.
