DynaPDF.ChangeJavaScriptName
----------------------------

Changes the name of a global JavaScript.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [13.2](newinversion132.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.ChangeJavaScriptName"; PDF; Index; New Name ) 

**MBS**( **"DynaPDF.ChangeJavaScriptName";** /\* Changes the name of a global JavaScript. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Index**; /\* The index for the JavaScript to change.  
Range from 0 to [DynaPDF.GetJavaScriptCount](DynaPDFGetJavaScriptCount.md)-1.e.g. 0 \*/   
**$New Name**) /\* The new name of the JavaScript.e.g. "test" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Index | The index for the JavaScript to change.   Range from 0 to [DynaPDF.GetJavaScriptCount](DynaPDFGetJavaScriptCount.md)-1. | 0 |
| New Name | The new name of the JavaScript. | "test" |

### Result

Returns OK or error.

### Description

Changes the name of a global JavaScript.   
The parameter Name defines the name of this script. This name is NOT used to identify a function inside the JavaScript; it is only used in Adobe's Acrobat to select a specific script. The script name must be unique. Different scripts cannot not use the same name.   
See also [ChangeJavaScriptName](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ChangeJavaScriptName.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeJavaScript](DynaPDFChangeJavaScript.md)
- [DynaPDF.ChangeJavaScriptAction](DynaPDFChangeJavaScriptAction.md)
- [DynaPDF.GetJavaScript](DynaPDFGetJavaScript.md)
- [DynaPDF.GetJavaScriptCount](DynaPDFGetJavaScriptCount.md)
- [DynaPDF.GetJavaScriptName](DynaPDFGetJavaScriptName.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 13.2**
    - Added [DynaPDF.AddJavaScript](https://www.mbsplugins.eu/DynaPDFAddJavaScript.shtml), [DynaPDF.ChangeJavaScript](https://www.mbsplugins.eu/DynaPDFChangeJavaScript.shtml), [DynaPDF.ChangeJavaScriptAction](https://www.mbsplugins.eu/DynaPDFChangeJavaScriptAction.shtml), [DynaPDF.ChangeJavaScriptName](https://www.mbsplugins.eu/DynaPDFChangeJavaScriptName.shtml), [DynaPDF.GetActionCount](https://www.mbsplugins.eu/DynaPDFGetActionCount.shtml), [DynaPDF.GetJavaScript](https://www.mbsplugins.eu/DynaPDFGetJavaScript.shtml), [DynaPDF.GetJavaScriptAction](https://www.mbsplugins.eu/DynaPDFGetJavaScriptAction.shtml), [DynaPDF.GetJavaScriptName](https://www.mbsplugins.eu/DynaPDFGetJavaScriptName.shtml).

### Blog Entries

- [New in MBS FileMaker Plugin 13.2](https://www.mbsplugins.de/archive/2023-05-17/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.2pr3](https://www.mbsplugins.de/archive/2023-04-20/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th April 2023 , last changed 15th April 2023

  
[DynaPDF.ChangeJavaScriptAction](DynaPDFChangeJavaScriptAction.md) - [DynaPDF.ChangeLinkAnnot](DynaPDFChangeLinkAnnot.md)

[HTML Version](DynaPDFChangeJavaScriptName.shtml)