# Javascript: Selection.isCommonPageMarginsValueSelected Method

> Informs about whether an attribute from the PageMargins.Attribute enumeration has the same value for the complete selection.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Selection.isCommonPageMarginsValueSelected Method
- **412 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/iscommonpagemarginsvalueselected-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/iscommonpagemarginsvalueselected-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/iscommonpagemarginsvalueselected-method/llms-full.txt

---

### Description

Informs about whether an attribute from the PageMargins.Attribute enumeration has the same value for the complete selection.

### Syntax

```javascript
<void> Selection.isCommonPageMarginsValueSelected(<PageMargins.Attribute> pageMarginsAttribute, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| pageMarginsAttribute | Specifies a possible value from the enumeration. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Selection.isCommonPageMarginsValueSelected` in a practical document-editing workflow. Informs about whether an attribute from the PageMargins.Attribute enumeration has the same value for the complete selection.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function isCommonPageMarginsValueSelected(pageMarginsAttribute) {
    TXTextControl.selection.isCommonPageMarginsValueSelected(
        pageMarginsAttribute,
        function() {
            console.log("is common page margins value selected completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: Selection.isCommonPageBorderValueSelected Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/iscommonpagebordervalueselected-method/llms-full.txt)
- **Next:** [Javascript: Selection.isCommonPageSizeValueSelected Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/iscommonpagesizevalueselected-method/llms-full.txt)
