DynaPDF.GetJavaScriptName
-------------------------

Returns 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.GetJavaScriptName"; PDF; Index ) 

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

### Parameters

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

### Result

Returns text or error.

### Description

Returns the name of a global JavaScript.   
The parameter Index must be a valid handle of a global JavaScript.   
Use the function [DynaPDF.GetJavaScriptCount](DynaPDFGetJavaScriptCount.md) to determine the number of available scripts. The handles of global JavaScripts are simple array indexes.  
See also [GetJavaScriptName](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetJavaScriptName.shtml) function in DynaPDF manual.

### Examples

Query the name of the thing we added:

 Set Variable \[ $r ; Value: MBS ("[DynaPDF.AddJavaScript](DynaPDFAddJavaScript.md)"; $pdf ; "test"; "function test() { return 123; }") \]   
Set Variable \[ $name ; Value: MBS ("DynaPDF.GetJavaScriptName"; $pdf ; 0) \]  
### See also

- [DynaPDF.AddJavaScript](DynaPDFAddJavaScript.md)
- [DynaPDF.ChangeJavaScriptName](DynaPDFChangeJavaScriptName.md)
- [DynaPDF.GetJavaScript](DynaPDFGetJavaScript.md)
- [DynaPDF.GetJavaScriptAction](DynaPDFGetJavaScriptAction.md)
- [DynaPDF.GetJavaScriptCount](DynaPDFGetJavaScriptCount.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

- [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.GetJavaScriptCount](DynaPDFGetJavaScriptCount.md) - [DynaPDF.GetLanguage](DynaPDFGetLanguage.md)

[HTML Version](DynaPDFGetJavaScriptName.shtml)